summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/run_tests6
-rw-r--r--lib/leap_cli/commands/deploy.rb2
-rw-r--r--puppet/modules/site_config/manifests/remove/files.pp19
-rw-r--r--tests/server-tests/README.md (renamed from tests/README.md)29
-rw-r--r--tests/server-tests/helpers/bonafide_helper.rb (renamed from tests/helpers/bonafide_helper.rb)0
-rw-r--r--tests/server-tests/helpers/client_side_db.py (renamed from tests/helpers/client_side_db.py)0
-rw-r--r--tests/server-tests/helpers/couchdb_helper.rb (renamed from tests/helpers/couchdb_helper.rb)0
-rw-r--r--tests/server-tests/helpers/files_helper.rb (renamed from tests/helpers/files_helper.rb)0
-rw-r--r--tests/server-tests/helpers/http_helper.rb (renamed from tests/helpers/http_helper.rb)0
-rw-r--r--tests/server-tests/helpers/network_helper.rb (renamed from tests/helpers/network_helper.rb)0
-rw-r--r--tests/server-tests/helpers/os_helper.rb (renamed from tests/helpers/os_helper.rb)0
-rw-r--r--tests/server-tests/helpers/smtp_helper.rb (renamed from tests/helpers/smtp_helper.rb)0
-rwxr-xr-xtests/server-tests/helpers/soledad_sync.py (renamed from tests/helpers/soledad_sync.py)0
-rw-r--r--tests/server-tests/helpers/srp_helper.rb (renamed from tests/helpers/srp_helper.rb)0
-rw-r--r--tests/server-tests/order.rb (renamed from tests/order.rb)0
-rw-r--r--tests/server-tests/white-box/couchdb.rb (renamed from tests/white-box/couchdb.rb)0
-rw-r--r--tests/server-tests/white-box/dummy.rb (renamed from tests/white-box/dummy.rb)0
-rw-r--r--tests/server-tests/white-box/mx.rb (renamed from tests/white-box/mx.rb)0
-rw-r--r--tests/server-tests/white-box/network.rb (renamed from tests/white-box/network.rb)0
-rw-r--r--tests/server-tests/white-box/openvpn.rb (renamed from tests/white-box/openvpn.rb)0
-rw-r--r--tests/server-tests/white-box/soledad.rb (renamed from tests/white-box/soledad.rb)0
-rw-r--r--tests/server-tests/white-box/webapp.rb (renamed from tests/white-box/webapp.rb)0
22 files changed, 46 insertions, 10 deletions
diff --git a/bin/run_tests b/bin/run_tests
index b25a419c..8450a9bf 100755
--- a/bin/run_tests
+++ b/bin/run_tests
@@ -1,7 +1,7 @@
#!/usr/bin/ruby
#
-# this script will run the unit tests in ../tests/*.rb.
+# This script will run the unit tests in /srv/leap/tests
#
# Tests for the platform differ from traditional ruby unit tests in a few ways:
#
@@ -29,11 +29,11 @@ EXIT_CODES = {
HIERA_FILE = '/etc/leap/hiera.yaml'
HELPER_PATHS = [
- '../../tests/helpers/*.rb',
+ '/srv/leap/tests/server-tests/helpers/*.rb',
'/srv/leap/files/tests/helpers/*.rb'
]
TEST_PATHS = [
- '../../tests/white-box/*.rb',
+ '/srv/leap/tests/server-tests/white-box/*.rb',
'/srv/leap/files/tests/white-box/*.rb',
'/srv/leap/tests_custom/*.rb'
]
diff --git a/lib/leap_cli/commands/deploy.rb b/lib/leap_cli/commands/deploy.rb
index a09fddbe..91e25a96 100644
--- a/lib/leap_cli/commands/deploy.rb
+++ b/lib/leap_cli/commands/deploy.rb
@@ -275,7 +275,7 @@ module LeapCli
sync.source = '.'
sync.chdir = Path.platform
sync.excludes = '*'
- sync.includes = ['/bin', '/bin/**', '/puppet', '/puppet/**', '/tests', '/tests/**']
+ sync.includes = ['/bin', '/bin/**', '/puppet', '/puppet/**', '/tests', '/tests/server-tests', '/tests/server-tests/**']
sync.flags = "-rlt --relative --delete --copy-links"
sync.exec
end
diff --git a/puppet/modules/site_config/manifests/remove/files.pp b/puppet/modules/site_config/manifests/remove/files.pp
index 3de8d695..ac2350a0 100644
--- a/puppet/modules/site_config/manifests/remove/files.pp
+++ b/puppet/modules/site_config/manifests/remove/files.pp
@@ -12,11 +12,28 @@
class site_config::remove::files {
#
- # Platform X removals
+ # Platform 0.9 removals
#
tidy {
+ # moved to /srv/static/public/provider.json
+ # for permissions reasons.
'/srv/leap/provider.json':;
+
+ # tests are moved to /srv/leap/tests/server-tests
+ # by rsync is not able to clean up the old location,
+ # so, we do it here:
+ '/srv/leap/tests/order.rb':;
+ '/srv/leap/tests/README.md':;
+ '/srv/leap/tests/helpers':
+ recurse => true,
+ rmdirs => true;
+ '/srv/leap/tests/puppet':
+ recurse => true,
+ rmdirs => true;
+ '/srv/leap/tests/white-box':
+ recurse => true,
+ rmdirs => true;
}
#
diff --git a/tests/README.md b/tests/server-tests/README.md
index 814c25b1..29db2e06 100644
--- a/tests/README.md
+++ b/tests/server-tests/README.md
@@ -1,12 +1,31 @@
-Tests
+Tests for Server
---------------------------------
-tests/white-box/
+The tests in this directory are run against the servers of a live running
+provider.
+
+Usage
+---------------------------------
+
+To run the tests from a local workstation:
+
+ workstation$ cd <my provider directory>
+ workstation$ leap test
+
+To run the tests from the server itself:
+
+ workstation$ leap ssh servername
+ servername# run_tests
+
+Notes
+---------------------------------
+
+server-tests/white-box/
These tests are run on the server as superuser. They are for
troubleshooting any problems with the internal setup of the server.
-tests/black-box/
+server-tests/black-box/
These test are run the user's local machine. They are for troubleshooting
any external problems with the service exposed by the server.
@@ -14,11 +33,11 @@ tests/black-box/
Additional Files
---------------------------------
-tests/helpers/
+server-tests/helpers/
Utility functions made available to all tests.
-tests/order.rb
+server-tests/order.rb
Configuration file to specify which nodes should be tested in which order.
diff --git a/tests/helpers/bonafide_helper.rb b/tests/server-tests/helpers/bonafide_helper.rb
index 5b886228..5b886228 100644
--- a/tests/helpers/bonafide_helper.rb
+++ b/tests/server-tests/helpers/bonafide_helper.rb
diff --git a/tests/helpers/client_side_db.py b/tests/server-tests/helpers/client_side_db.py
index 2f8c220f..2f8c220f 100644
--- a/tests/helpers/client_side_db.py
+++ b/tests/server-tests/helpers/client_side_db.py
diff --git a/tests/helpers/couchdb_helper.rb b/tests/server-tests/helpers/couchdb_helper.rb
index efb2c2bf..efb2c2bf 100644
--- a/tests/helpers/couchdb_helper.rb
+++ b/tests/server-tests/helpers/couchdb_helper.rb
diff --git a/tests/helpers/files_helper.rb b/tests/server-tests/helpers/files_helper.rb
index d6795889..d6795889 100644
--- a/tests/helpers/files_helper.rb
+++ b/tests/server-tests/helpers/files_helper.rb
diff --git a/tests/helpers/http_helper.rb b/tests/server-tests/helpers/http_helper.rb
index 0d0bb7d5..0d0bb7d5 100644
--- a/tests/helpers/http_helper.rb
+++ b/tests/server-tests/helpers/http_helper.rb
diff --git a/tests/helpers/network_helper.rb b/tests/server-tests/helpers/network_helper.rb
index 713d57aa..713d57aa 100644
--- a/tests/helpers/network_helper.rb
+++ b/tests/server-tests/helpers/network_helper.rb
diff --git a/tests/helpers/os_helper.rb b/tests/server-tests/helpers/os_helper.rb
index 9923d5b1..9923d5b1 100644
--- a/tests/helpers/os_helper.rb
+++ b/tests/server-tests/helpers/os_helper.rb
diff --git a/tests/helpers/smtp_helper.rb b/tests/server-tests/helpers/smtp_helper.rb
index ea7fb9fa..ea7fb9fa 100644
--- a/tests/helpers/smtp_helper.rb
+++ b/tests/server-tests/helpers/smtp_helper.rb
diff --git a/tests/helpers/soledad_sync.py b/tests/server-tests/helpers/soledad_sync.py
index f4fc81ae..f4fc81ae 100755
--- a/tests/helpers/soledad_sync.py
+++ b/tests/server-tests/helpers/soledad_sync.py
diff --git a/tests/helpers/srp_helper.rb b/tests/server-tests/helpers/srp_helper.rb
index b30fa768..b30fa768 100644
--- a/tests/helpers/srp_helper.rb
+++ b/tests/server-tests/helpers/srp_helper.rb
diff --git a/tests/order.rb b/tests/server-tests/order.rb
index 14aad9be..14aad9be 100644
--- a/tests/order.rb
+++ b/tests/server-tests/order.rb
diff --git a/tests/white-box/couchdb.rb b/tests/server-tests/white-box/couchdb.rb
index 44a2769b..44a2769b 100644
--- a/tests/white-box/couchdb.rb
+++ b/tests/server-tests/white-box/couchdb.rb
diff --git a/tests/white-box/dummy.rb b/tests/server-tests/white-box/dummy.rb
index a3e8ad68..a3e8ad68 100644
--- a/tests/white-box/dummy.rb
+++ b/tests/server-tests/white-box/dummy.rb
diff --git a/tests/white-box/mx.rb b/tests/server-tests/white-box/mx.rb
index 0eeaacd0..0eeaacd0 100644
--- a/tests/white-box/mx.rb
+++ b/tests/server-tests/white-box/mx.rb
diff --git a/tests/white-box/network.rb b/tests/server-tests/white-box/network.rb
index a08cdfbe..a08cdfbe 100644
--- a/tests/white-box/network.rb
+++ b/tests/server-tests/white-box/network.rb
diff --git a/tests/white-box/openvpn.rb b/tests/server-tests/white-box/openvpn.rb
index 170d4503..170d4503 100644
--- a/tests/white-box/openvpn.rb
+++ b/tests/server-tests/white-box/openvpn.rb
diff --git a/tests/white-box/soledad.rb b/tests/server-tests/white-box/soledad.rb
index d41bee58..d41bee58 100644
--- a/tests/white-box/soledad.rb
+++ b/tests/server-tests/white-box/soledad.rb
diff --git a/tests/white-box/webapp.rb b/tests/server-tests/white-box/webapp.rb
index 40c234d6..40c234d6 100644
--- a/tests/white-box/webapp.rb
+++ b/tests/server-tests/white-box/webapp.rb