Update the osbuild/images to the version which introduces "dot notation" for distro release versions. - Replace all uses of distroregistry by distrofactory. - Delete local version of reporegistry and use the one from the osbuild/images. - Weldr: unify `createWeldrAPI()` and `createWeldrAPI2()` into a single `createTestWeldrAPI()` function`. - store/fixture: rework fixtures to allow overriding the host distro name and host architecture name. A cleanup function to restore the host distro and arch names is always part of the fixture struct. - Delete `distro_mock` package, since it is no longer used. - Bump the required version of osbuild to 98, because the OSCAP customization is using the 'compress_results' stage option, which is not available in older versions of osbuild. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
33 lines
1 KiB
Ruby
33 lines
1 KiB
Ruby
GOVERSION = "1.17.8"
|
|
|
|
Vagrant.configure("2") do |config|
|
|
config.vm.define "ubuntu" do |ubuntu|
|
|
ubuntu.vm.box = "generic/ubuntu2004"
|
|
end
|
|
config.vm.define "freebsd" do |freebsd|
|
|
freebsd.vm.box = "generic/freebsd13"
|
|
end
|
|
config.ssh.forward_agent = true
|
|
config.vm.synced_folder ".", "/home/vagrant/go/src/github.com/mistifyio/go-zfs", create: true
|
|
config.vm.provision "shell", inline: <<-EOF
|
|
set -euxo pipefail
|
|
|
|
os=$(uname -s|tr '[A-Z]' '[a-z]')
|
|
case $os in
|
|
linux) apt-get update -y && apt-get install -y --no-install-recommends gcc libc-dev zfsutils-linux ;;
|
|
esac
|
|
|
|
cd /tmp
|
|
curl -fLO --retry-max-time 30 --retry 10 https://go.dev/dl/go#{GOVERSION}.$os-amd64.tar.gz
|
|
tar -C /usr/local -zxf go#{GOVERSION}.$os-amd64.tar.gz
|
|
ln -nsf /usr/local/go/bin/go /usr/local/bin/go
|
|
rm -rf go*.tar.gz
|
|
|
|
chown -R vagrant:vagrant /home/vagrant/go
|
|
cd /home/vagrant/go/src/github.com/mistifyio/go-zfs
|
|
go test -c
|
|
sudo ./go-zfs.test -test.v
|
|
CGO_ENABLED=0 go test -c
|
|
sudo ./go-zfs.test -test.v
|
|
EOF
|
|
end
|