summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--tests/README.md29
-rw-r--r--tests/example-provider/README.md8
-rw-r--r--tests/example-provider/Vagrantfile (renamed from Vagrantfile)8
-rw-r--r--tests/example-provider/hiera.yaml (renamed from hiera.yaml)0
-rwxr-xr-xtests/example-provider/vagrant/add-pixelated.sh (renamed from vagrant/add-pixelated.sh)0
-rwxr-xr-xtests/example-provider/vagrant/configure-leap.sh (renamed from vagrant/configure-leap.sh)2
-rwxr-xr-xtests/example-provider/vagrant/install-platform.pp (renamed from vagrant/install-platform.pp)0
-rw-r--r--tests/example-provider/vagrant/vagrant.config (renamed from vagrant/vagrant.config)1
9 files changed, 46 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 9f24fd63..146bd8ce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-/.vagrant
+/tests/example-provider/.vagrant
/puppet/modules/site_custom
/Gemfile.lock
/tests/puppet/provider/hiera
diff --git a/tests/README.md b/tests/README.md
new file mode 100644
index 00000000..a3628495
--- /dev/null
+++ b/tests/README.md
@@ -0,0 +1,29 @@
+What is here?
+
+**server-tests/**
+
+These are the tests run on a provider's servers using the command:
+
+ workstation$ leap test
+
+Or the command:
+
+ server# run_tests
+
+These tests are to confirm that a provider's infrasture is working and to troubleshoot any possible problems.
+
+**example-provider/**
+
+Files to support the command:
+
+ cd leap_platform/tests/example-provider
+ vagrant up
+
+For quick booting a pre-configured sample provider, running in a single virtual
+machine.
+
+**platform-ci/**
+
+Continous integration tests run for the LEAP Platform. These tests are for the
+platform code itself.
+
diff --git a/tests/example-provider/README.md b/tests/example-provider/README.md
new file mode 100644
index 00000000..62cdc01a
--- /dev/null
+++ b/tests/example-provider/README.md
@@ -0,0 +1,8 @@
+Here lies a script to generate a pre-configured provider using Vagrant virtual
+machines.
+
+All you have to do is this:
+
+ cd leap_platform/tests/example-provider
+ vagrant up
+
diff --git a/Vagrantfile b/tests/example-provider/Vagrantfile
index 6f3cf23c..1e410f5e 100644
--- a/Vagrantfile
+++ b/tests/example-provider/Vagrantfile
@@ -5,6 +5,10 @@ Vagrant.configure("2") do |config|
# shared config for all boxes
+ # make the leap_platform directory available as /srv/leap_platform
+ # inside the virtual machine.
+ config.vm.synced_folder "../..", "/srv/leap_platform"
+
# Please verify the sha512 sum of the downloaded box before importing it into vagrant !
# see https://leap.se/en/docs/platform/details/development#Verify.vagrantbox.download
# for details
@@ -29,10 +33,10 @@ Vagrant.configure("2") do |config|
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = "./vagrant"
- puppet.module_path = "./puppet/modules"
+ puppet.module_path = "../../puppet/modules"
puppet.manifest_file = "install-platform.pp"
puppet.options = "--verbose"
- puppet.hiera_config_path = "hiera.yaml"
+ puppet.hiera_config_path = "./hiera.yaml"
end
config.vm.provision "shell", path: "vagrant/configure-leap.sh"
diff --git a/hiera.yaml b/tests/example-provider/hiera.yaml
index 3ff857b8..3ff857b8 100644
--- a/hiera.yaml
+++ b/tests/example-provider/hiera.yaml
diff --git a/vagrant/add-pixelated.sh b/tests/example-provider/vagrant/add-pixelated.sh
index f9908947..f9908947 100755
--- a/vagrant/add-pixelated.sh
+++ b/tests/example-provider/vagrant/add-pixelated.sh
diff --git a/vagrant/configure-leap.sh b/tests/example-provider/vagrant/configure-leap.sh
index 9ddee039..fd34d7ea 100755
--- a/vagrant/configure-leap.sh
+++ b/tests/example-provider/vagrant/configure-leap.sh
@@ -14,7 +14,7 @@ mkdir -p $PROVIDERDIR
chown ${USER}:${USER} ${PROVIDERDIR}
cd $PROVIDERDIR
-$LEAP $OPTS new --contacts "$contacts" --domain "$provider_domain" --name "$provider_name" --platform=/vagrant .
+$LEAP $OPTS new --contacts "$contacts" --domain "$provider_domain" --name "$provider_name" --platform="$PLATFORMDIR" .
echo -e '\n@log = "./deploy.log"' >> Leapfile
if [ ! -e /home/${USER}/.ssh/id_rsa ]; then
diff --git a/vagrant/install-platform.pp b/tests/example-provider/vagrant/install-platform.pp
index 223853c1..223853c1 100755
--- a/vagrant/install-platform.pp
+++ b/tests/example-provider/vagrant/install-platform.pp
diff --git a/vagrant/vagrant.config b/tests/example-provider/vagrant/vagrant.config
index e601488d..60d2a52c 100644
--- a/vagrant/vagrant.config
+++ b/tests/example-provider/vagrant/vagrant.config
@@ -17,6 +17,7 @@ USER='vagrant'
NODE='node1'
SUDO="sudo -u ${USER}"
PROVIDERDIR="/home/${USER}/leap/configuration"
+PLATFORMDIR="/srv/leap_platform"
LEAP="$SUDO /usr/local/bin/leap"
GIT="$SUDO git"