summaryrefslogtreecommitdiff
path: root/tests/white-box
diff options
context:
space:
mode:
authorvarac <varac@users.noreply.github.com>2015-11-17 19:53:28 +0100
committervarac <varac@users.noreply.github.com>2015-11-17 19:53:28 +0100
commitd89596c5b8da7345c65c940bb20b52a0910a4acd (patch)
tree358b74b7d95d8a3fb46f4827d6984a0f71cab0e1 /tests/white-box
parentdc035701e86385e8593630230bb2a5bef7ddf0e6 (diff)
parent6d9dc1a9bed8da7827e6f7cf80fe2ecff49ca308 (diff)
Merge pull request #86 from kalikaneko/new-soledad-test
New soledad test
Diffstat (limited to 'tests/white-box')
-rw-r--r--tests/white-box/webapp.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/white-box/webapp.rb b/tests/white-box/webapp.rb
index 48507521..e689c143 100644
--- a/tests/white-box/webapp.rb
+++ b/tests/white-box/webapp.rb
@@ -41,6 +41,35 @@ class Webapp < LeapTest
pass
end
+ def test_05_Can_create_and_authenticate_and_delete_user_via_API?
+ if property('webapp.allow_registration')
+ assert_tmp_user
+ pass
+ else
+ skip "New user registrations are disabled."
+ end
+ end
+
+ def test_06_Can_sync_Soledad?
+ return unless property('webapp.allow_registration')
+ soledad_config = property('definition_files.soledad_service')
+ if soledad_config && !soledad_config.empty?
+ soledad_server = pick_soledad_server(soledad_config)
+ if soledad_server
+ assert_tmp_user do |user|
+ command = File.expand_path "../../helpers/soledad_sync.py", __FILE__
+ soledad_url = "https://#{soledad_server}/user-#{user.id}"
+ soledad_cert = "/usr/local/share/ca-certificates/leap_ca.crt"
+ assert_run "#{command} #{user.id} #{user.session_token} #{soledad_url} #{soledad_cert} #{user.password}"
+ assert_user_db_exists(user)
+ pass
+ end
+ end
+ else
+ skip 'No soledad service configuration'
+ end
+ end
+
private
def url_options