Remove tests directory
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
[](https://xo-build-status.yawn.fi/builds/debian/build-status.html) [](https://xo-build-status.yawn.fi/builds/centos/build-status.html) [](https://xo-build-status.yawn.fi/builds/ubuntu/build-status.html)
|
||||||
|
|
||||||
# XenOrchestraInstallerUpdater - Install / Update Xen-Orchestra from sources
|
# XenOrchestraInstallerUpdater - Install / Update Xen-Orchestra from sources
|
||||||
|
|
||||||
|
48
tests/CentOS/Vagrantfile
vendored
48
tests/CentOS/Vagrantfile
vendored
@@ -1,48 +0,0 @@
|
|||||||
# -*- mode: ruby -*-
|
|
||||||
# vi: set ft=ruby :
|
|
||||||
|
|
||||||
# All Vagrant configuration is done below. The "2" in Vagrant.configure
|
|
||||||
# configures the configuration version (we support older styles for
|
|
||||||
# backwards compatibility). Please don't change it unless you know what
|
|
||||||
# you're doing.
|
|
||||||
Vagrant.configure(2) do |config|
|
|
||||||
# The most common configuration options are documented and commented below.
|
|
||||||
# For a complete reference, please see the online documentation at
|
|
||||||
# https://docs.vagrantup.com.
|
|
||||||
|
|
||||||
# Every Vagrant development environment requires a box. You can search for
|
|
||||||
# boxes at https://atlas.hashicorp.com/search.
|
|
||||||
config.vm.box = "centos/8"
|
|
||||||
|
|
||||||
# Disable automatic box update checking. If you disable this, then
|
|
||||||
# boxes will only be checked for updates when the user runs
|
|
||||||
# `vagrant box outdated`. This is not recommended.
|
|
||||||
# config.vm.box_check_update = false
|
|
||||||
|
|
||||||
# Create a private network, which allows host-only access to the machine
|
|
||||||
# using a specific IP.
|
|
||||||
config.vm.network "private_network", ip: "192.168.33.101"
|
|
||||||
|
|
||||||
# Share an additional folder to the guest VM. The first argument is
|
|
||||||
# the path on the host to the actual folder. The second argument is
|
|
||||||
# the path on the guest to mount the folder. And the optional third
|
|
||||||
# argument is a set of non-required options.
|
|
||||||
config.vm.synced_folder "../../", "/vagrant"
|
|
||||||
|
|
||||||
config.vm.provider "virtualbox" do |vb|
|
|
||||||
# Display the VirtualBox GUI when booting the machine
|
|
||||||
# Customize the amount of memory on the VM:
|
|
||||||
vb.memory = "3072"
|
|
||||||
end
|
|
||||||
|
|
||||||
# Disable the new default behavior introduced in Vagrant 1.7, to
|
|
||||||
# ensure that all Vagrant machines will use the same SSH key pair.
|
|
||||||
# See https://github.com/mitchellh/vagrant/issues/5005
|
|
||||||
config.ssh.insert_key = false
|
|
||||||
|
|
||||||
#
|
|
||||||
# Run automated test installation
|
|
||||||
#
|
|
||||||
config.vm.provision "install", type: "shell", inline: "/vagrant/xo-install.sh --install", run: "never"
|
|
||||||
config.vm.provision "update", type: "shell", inline: "/vagrant/xo-install.sh --update", run: "never"
|
|
||||||
end
|
|
48
tests/Debian/Vagrantfile
vendored
48
tests/Debian/Vagrantfile
vendored
@@ -1,48 +0,0 @@
|
|||||||
# -*- mode: ruby -*-
|
|
||||||
# vi: set ft=ruby :
|
|
||||||
|
|
||||||
# All Vagrant configuration is done below. The "2" in Vagrant.configure
|
|
||||||
# configures the configuration version (we support older styles for
|
|
||||||
# backwards compatibility). Please don't change it unless you know what
|
|
||||||
# you're doing.
|
|
||||||
Vagrant.configure(2) do |config|
|
|
||||||
# The most common configuration options are documented and commented below.
|
|
||||||
# For a complete reference, please see the online documentation at
|
|
||||||
# https://docs.vagrantup.com.
|
|
||||||
|
|
||||||
# Every Vagrant development environment requires a box. You can search for
|
|
||||||
# boxes at https://atlas.hashicorp.com/search.
|
|
||||||
config.vm.box = "debian/buster64"
|
|
||||||
|
|
||||||
# Disable automatic box update checking. If you disable this, then
|
|
||||||
# boxes will only be checked for updates when the user runs
|
|
||||||
# `vagrant box outdated`. This is not recommended.
|
|
||||||
# config.vm.box_check_update = false
|
|
||||||
|
|
||||||
# Create a private network, which allows host-only access to the machine
|
|
||||||
# using a specific IP.
|
|
||||||
config.vm.network "private_network", ip: "192.168.33.101"
|
|
||||||
|
|
||||||
# Share an additional folder to the guest VM. The first argument is
|
|
||||||
# the path on the host to the actual folder. The second argument is
|
|
||||||
# the path on the guest to mount the folder. And the optional third
|
|
||||||
# argument is a set of non-required options.
|
|
||||||
config.vm.synced_folder "../../", "/vagrant"
|
|
||||||
|
|
||||||
config.vm.provider "virtualbox" do |vb|
|
|
||||||
# Display the VirtualBox GUI when booting the machine
|
|
||||||
# Customize the amount of memory on the VM:
|
|
||||||
vb.memory = "3072"
|
|
||||||
end
|
|
||||||
|
|
||||||
# Disable the new default behavior introduced in Vagrant 1.7, to
|
|
||||||
# ensure that all Vagrant machines will use the same SSH key pair.
|
|
||||||
# See https://github.com/mitchellh/vagrant/issues/5005
|
|
||||||
config.ssh.insert_key = false
|
|
||||||
|
|
||||||
#
|
|
||||||
# Run automated test installation
|
|
||||||
#
|
|
||||||
config.vm.provision "install", type: "shell", inline: "/vagrant/xo-install.sh --install", run: "never"
|
|
||||||
config.vm.provision "update", type: "shell", inline: "/vagrant/xo-install.sh --update", run: "never"
|
|
||||||
end
|
|
@@ -1,26 +0,0 @@
|
|||||||
## Tests
|
|
||||||
|
|
||||||
Automated tests to run installation on different operating systems and make sure the login page replies correctly.
|
|
||||||
|
|
||||||
`run-tests.sh` without arguments builds up each vagrant box one by one and outputs if curl check was successful or not.
|
|
||||||
|
|
||||||
```
|
|
||||||
./run-tests.sh
|
|
||||||
CentOS HTTP Check: success
|
|
||||||
Debian HTTP Check: success
|
|
||||||
Ubuntu HTTP Check: success
|
|
||||||
```
|
|
||||||
|
|
||||||
Single OS can be tested by giving Ubuntu, CentOS or Debian as first argument for the script.
|
|
||||||
|
|
||||||
```
|
|
||||||
./run-tests.sh Ubuntu
|
|
||||||
Ubuntu HTTP Check: success
|
|
||||||
```
|
|
||||||
|
|
||||||
Requirements:
|
|
||||||
```
|
|
||||||
OSX (not tested with anything else since this is mainly for my own use)
|
|
||||||
Vagrant
|
|
||||||
Virtualbox
|
|
||||||
````
|
|
48
tests/Ubuntu/Vagrantfile
vendored
48
tests/Ubuntu/Vagrantfile
vendored
@@ -1,48 +0,0 @@
|
|||||||
# -*- mode: ruby -*-
|
|
||||||
# vi: set ft=ruby :
|
|
||||||
|
|
||||||
# All Vagrant configuration is done below. The "2" in Vagrant.configure
|
|
||||||
# configures the configuration version (we support older styles for
|
|
||||||
# backwards compatibility). Please don't change it unless you know what
|
|
||||||
# you're doing.
|
|
||||||
Vagrant.configure(2) do |config|
|
|
||||||
# The most common configuration options are documented and commented below.
|
|
||||||
# For a complete reference, please see the online documentation at
|
|
||||||
# https://docs.vagrantup.com.
|
|
||||||
|
|
||||||
# Every Vagrant development environment requires a box. You can search for
|
|
||||||
# boxes at https://atlas.hashicorp.com/search.
|
|
||||||
config.vm.box = "ubuntu/bionic64"
|
|
||||||
|
|
||||||
# Disable automatic box update checking. If you disable this, then
|
|
||||||
# boxes will only be checked for updates when the user runs
|
|
||||||
# `vagrant box outdated`. This is not recommended.
|
|
||||||
# config.vm.box_check_update = false
|
|
||||||
|
|
||||||
# Create a private network, which allows host-only access to the machine
|
|
||||||
# using a specific IP.
|
|
||||||
config.vm.network "private_network", ip: "192.168.33.101"
|
|
||||||
|
|
||||||
# Share an additional folder to the guest VM. The first argument is
|
|
||||||
# the path on the host to the actual folder. The second argument is
|
|
||||||
# the path on the guest to mount the folder. And the optional third
|
|
||||||
# argument is a set of non-required options.
|
|
||||||
config.vm.synced_folder "../../", "/vagrant"
|
|
||||||
|
|
||||||
config.vm.provider "virtualbox" do |vb|
|
|
||||||
# Display the VirtualBox GUI when booting the machine
|
|
||||||
# Customize the amount of memory on the VM:
|
|
||||||
vb.memory = "3072"
|
|
||||||
end
|
|
||||||
|
|
||||||
# Disable the new default behavior introduced in Vagrant 1.7, to
|
|
||||||
# ensure that all Vagrant machines will use the same SSH key pair.
|
|
||||||
# See https://github.com/mitchellh/vagrant/issues/5005
|
|
||||||
config.ssh.insert_key = false
|
|
||||||
|
|
||||||
#
|
|
||||||
# Run automated test installation
|
|
||||||
#
|
|
||||||
config.vm.provision "install", type: "shell", inline: "/vagrant/xo-install.sh --install", run: "never"
|
|
||||||
config.vm.provision "update", type: "shell", inline: "/vagrant/xo-install.sh --update", run: "never"
|
|
||||||
end
|
|
@@ -1,95 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
function RunTestsSingle {
|
|
||||||
|
|
||||||
export VAGRANT_CWD="$(dirname $0)/$1"
|
|
||||||
local LOGFILE="$(dirname $0)/$1/installation-test.log"
|
|
||||||
vagrant up --no-provision &> $LOGFILE
|
|
||||||
|
|
||||||
if [[ $? == "1" ]]; then
|
|
||||||
echo "Vagrant box failed to start, exiting"
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
vagrant provision --provision-with install >> $LOGFILE 2>&1
|
|
||||||
sleep 5
|
|
||||||
echo "" >> $LOGFILE
|
|
||||||
echo "Curl output after install:" >> $LOGFILE
|
|
||||||
curl -s -L 192.168.33.101 >> $LOGFILE 2>&1 || false
|
|
||||||
|
|
||||||
if [[ $? == "1" ]]; then
|
|
||||||
echo "$1 install HTTP Check: failed"
|
|
||||||
else
|
|
||||||
echo "$1 install HTTP Check: success"
|
|
||||||
fi
|
|
||||||
sleep 5
|
|
||||||
|
|
||||||
vagrant provision --provision-with update >> $LOGFILE 2>&1
|
|
||||||
sleep 5
|
|
||||||
echo "" >> $LOGFILE
|
|
||||||
echo "Curl output after update:" >> $LOGFILE
|
|
||||||
curl -s -L 192.168.33.101 >> $LOGFILE 2>&1 || false
|
|
||||||
|
|
||||||
if [[ $? == "1" ]]; then
|
|
||||||
echo "$1 update HTTP Check: failed"
|
|
||||||
else
|
|
||||||
echo "$1 update HTTP Check: success"
|
|
||||||
fi
|
|
||||||
sleep 5
|
|
||||||
|
|
||||||
vagrant destroy -f >> $LOGFILE 2>&1
|
|
||||||
unset VAGRANT_CWD
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function RunTestsAll {
|
|
||||||
|
|
||||||
for x in CentOS Debian Ubuntu; do
|
|
||||||
|
|
||||||
export VAGRANT_CWD="$(dirname $0)/$x"
|
|
||||||
local LOGFILE="$(dirname $0)/$x/installation-test.log"
|
|
||||||
vagrant up --no-provision &> $LOGFILE
|
|
||||||
|
|
||||||
if [[ $? == "1" ]]; then
|
|
||||||
echo "Vagrant box failed to start, exiting"
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
vagrant provision --provision-with install >> $LOGFILE 2>&1
|
|
||||||
sleep 5
|
|
||||||
echo "" >> $LOGFILE
|
|
||||||
echo "Curl output after install:" >> $LOGFILE
|
|
||||||
curl -s -L -m 5 192.168.33.101 >> $LOGFILE 2>&1 || false
|
|
||||||
|
|
||||||
if [[ $? == "1" ]]; then
|
|
||||||
echo "$x install HTTP Check: failed"
|
|
||||||
else
|
|
||||||
echo "$x install HTTP Check: success"
|
|
||||||
fi
|
|
||||||
sleep 5
|
|
||||||
|
|
||||||
vagrant provision --provision-with update >> $LOGFILE 2>&1
|
|
||||||
sleep 5
|
|
||||||
echo "" >> $LOGFILE
|
|
||||||
echo "Curl output after update:" >> $LOGFILE
|
|
||||||
curl -s -L -m 5 192.168.33.101 >> $LOGFILE 2>&1 || false
|
|
||||||
|
|
||||||
if [[ $? == "1" ]]; then
|
|
||||||
echo "$x update HTTP Check: failed"
|
|
||||||
else
|
|
||||||
echo "$x update HTTP Check: success"
|
|
||||||
fi
|
|
||||||
|
|
||||||
vagrant destroy -f >> $LOGFILE 2>&1
|
|
||||||
unset VAGRANT_CWD
|
|
||||||
done
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ $# == "1" ]]; then
|
|
||||||
RunTestsSingle "$1"
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
RunTestsAll
|
|
||||||
exit 0
|
|
||||||
fi
|
|
Reference in New Issue
Block a user