update test environment

- fix problems with already existing files when doing `vagrant reload`
- try reloading distgit before setting it up
This commit is contained in:
clime 2018-01-13 17:21:18 +01:00
parent 9631061653
commit 89d4718361
2 changed files with 9 additions and 1 deletions

8
Vagrantfile vendored
View file

@ -23,6 +23,10 @@ Vagrant.configure(2) do |config|
inline: "dnf builddep -y /vagrant/dist-git.spec",
run: "always"
distgit.vm.provision "shell",
inline: "rm -rf /tmp/tito/noarch",
run: "always"
distgit.vm.provision "shell",
inline: "cd /vagrant/ && tito build --test --rpm",
run: "always"
@ -38,6 +42,10 @@ Vagrant.configure(2) do |config|
distgit.vm.provision "shell",
inline: "echo 'clime ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers"
distgit.vm.provision "shell",
inline: "rm -rf /tmp/pkgs-files",
run: "always"
distgit.vm.provision "file",
source: "./beaker-tests/pkgs-files", destination: "/tmp/pkgs-files",
run: "always"

View file

@ -31,7 +31,7 @@ systemctl enable libvirtd && systemctl start libvirtd
systemctl start virtlogd.socket # this is currently needed in f25 for vagrant to work with libvirtd
cd $DISTGITROOTDIR
vagrant up distgit
vagrant reload distgit || vagrant up distgit
IPADDR=`vagrant ssh -c "ifconfig eth0 | grep -E 'inet\s' | sed 's/\s*inet\s*\([0-9.]*\).*/\1/'"`
echo "$IPADDR pkgs.example.org" >> /etc/hosts