From 9ad2e38a3f4dbac01ef7500c3ee68ff11dc3d167 Mon Sep 17 00:00:00 2001 From: ronivay Date: Wed, 30 Jun 2021 15:13:59 +0300 Subject: [PATCH] Remove tests directory --- README.md | 1 + tests/CentOS/Vagrantfile | 48 -------------------- tests/Debian/Vagrantfile | 48 -------------------- tests/README.md | 26 ----------- tests/Ubuntu/Vagrantfile | 48 -------------------- tests/run-tests.sh | 95 ---------------------------------------- 6 files changed, 1 insertion(+), 265 deletions(-) delete mode 100644 tests/CentOS/Vagrantfile delete mode 100644 tests/Debian/Vagrantfile delete mode 100644 tests/README.md delete mode 100644 tests/Ubuntu/Vagrantfile delete mode 100755 tests/run-tests.sh diff --git a/README.md b/README.md index 7ced29c..4ecd821 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![](https://xo-build-status.yawn.fi/builds/debian/build-status.svg)](https://xo-build-status.yawn.fi/builds/debian/build-status.html) [![](https://xo-build-status.yawn.fi/builds/centos/build-status.svg)](https://xo-build-status.yawn.fi/builds/centos/build-status.html) [![](https://xo-build-status.yawn.fi/builds/ubuntu/build-status.svg)](https://xo-build-status.yawn.fi/builds/ubuntu/build-status.html) # XenOrchestraInstallerUpdater - Install / Update Xen-Orchestra from sources diff --git a/tests/CentOS/Vagrantfile b/tests/CentOS/Vagrantfile deleted file mode 100644 index d380521..0000000 --- a/tests/CentOS/Vagrantfile +++ /dev/null @@ -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 diff --git a/tests/Debian/Vagrantfile b/tests/Debian/Vagrantfile deleted file mode 100644 index 3b4df79..0000000 --- a/tests/Debian/Vagrantfile +++ /dev/null @@ -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 diff --git a/tests/README.md b/tests/README.md deleted file mode 100644 index 0826d24..0000000 --- a/tests/README.md +++ /dev/null @@ -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 -```` diff --git a/tests/Ubuntu/Vagrantfile b/tests/Ubuntu/Vagrantfile deleted file mode 100644 index 5e30c44..0000000 --- a/tests/Ubuntu/Vagrantfile +++ /dev/null @@ -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 diff --git a/tests/run-tests.sh b/tests/run-tests.sh deleted file mode 100755 index bc72ce7..0000000 --- a/tests/run-tests.sh +++ /dev/null @@ -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