33 |
33 |
'template_name': '',
|
34 |
34 |
'variables': {},
|
35 |
35 |
'title': 'Authentic',
|
36 |
|
'base_url': 'http://authentic.example.net',
|
|
36 |
'base_url': 'http://authentic.example.net/',
|
37 |
37 |
'id': 3,
|
38 |
38 |
'secret_key': '_b82$d)(xcw$dl@ieis@jhmrmbbeb4$=%lrpi*4p&b))*a*=5!',
|
39 |
39 |
'slug': 'authentic',
|
... | ... | |
45 |
45 |
'variables': {'xxx': 'HELLO WORLD'},
|
46 |
46 |
'title': 'Test wcs',
|
47 |
47 |
'saml-sp-metadata-url': 'http://wcs.example.net/saml/metadata',
|
48 |
|
'base_url': 'http://wcs.example.net',
|
|
48 |
'base_url': 'http://wcs.example.net/',
|
49 |
49 |
'backoffice-menu-url': 'http://wcs.example.net/backoffice/menu.json',
|
50 |
50 |
'id': 1,
|
51 |
51 |
'secret_key': 'eiue7aa10nt6e9*#jg2bsfvdgl)cr%4(tafibfjx9i$pgnfj#v',
|
... | ... | |
55 |
55 |
'service-id': 'combo',
|
56 |
56 |
'template_name': 'portal-agent',
|
57 |
57 |
'title': 'Portal Agents',
|
58 |
|
'base_url': 'http://agents.example.net',
|
|
58 |
'base_url': 'http://agents.example.net/',
|
59 |
59 |
'secret_key': 'aaa',
|
60 |
60 |
},
|
61 |
61 |
{
|
62 |
62 |
'service-id': 'combo',
|
63 |
63 |
'template_name': 'portal-user',
|
64 |
64 |
'title': 'Portal',
|
65 |
|
'base_url': 'http://portal.example.net',
|
|
65 |
'base_url': 'http://portal.example.net/',
|
66 |
66 |
'secret_key': 'bbb',
|
67 |
67 |
},
|
68 |
68 |
],
|
... | ... | |
227 |
227 |
assert pub.get_site_option('hobo_url', 'variables') == 'http://hobo.example.net/'
|
228 |
228 |
assert pub.get_site_option('foobar', 'variables') == 'http://example.net'
|
229 |
229 |
assert pub.get_site_option('xxx', 'variables') == 'HELLO WORLD'
|
230 |
|
assert pub.get_site_option('portal_agent_url', 'variables') == 'http://agents.example.net'
|
231 |
|
assert pub.get_site_option('portal_url', 'variables') == 'http://portal.example.net'
|
|
230 |
assert pub.get_site_option('portal_agent_url', 'variables') == 'http://agents.example.net/'
|
|
231 |
assert pub.get_site_option('portal_url', 'variables') == 'http://portal.example.net/'
|
232 |
232 |
assert (pub.get_site_option('authentic.example.net', 'api-secrets')
|
233 |
233 |
== CmdCheckHobos.shared_secret(HOBO_JSON['services'][1]['secret_key'],
|
234 |
234 |
HOBO_JSON['services'][2]['secret_key']))
|
... | ... | |
324 |
324 |
assert pub.cfg['saml_identities']['registration-url']
|
325 |
325 |
assert pub.cfg['sp']['idp-manage-user-attributes']
|
326 |
326 |
assert pub.cfg['sp']['idp-manage-roles']
|
|
327 |
assert pub.get_site_option('idp_account_url', 'variables').endswith('/accounts/')
|
327 |
328 |
|
328 |
329 |
def test_deploy():
|
329 |
330 |
cleanup()
|
... | ... | |
340 |
341 |
sub_options = sub_options_class(True, False, None)
|
341 |
342 |
sys.modules['publisher'] = sys.modules['wcs.publisher']
|
342 |
343 |
hobo_cmd.execute(base_options, sub_options,
|
343 |
|
['http://wcs.example.net', os.path.join(alt_tempdir, 'hobo.json')])
|
|
344 |
['http://wcs.example.net/', os.path.join(alt_tempdir, 'hobo.json')])
|
344 |
345 |
assert os.path.exists(os.path.join(alt_tempdir, 'wcs.example.net'))
|
345 |
346 |
|
346 |
347 |
# update
|
... | ... | |
351 |
352 |
cPickle.dump(pub_cfg,
|
352 |
353 |
open(os.path.join(alt_tempdir, 'wcs.example.net', 'config.pck'), 'w'))
|
353 |
354 |
hobo_cmd.execute(base_options, sub_options,
|
354 |
|
['http://wcs.example.net', os.path.join(alt_tempdir, 'hobo.json')])
|
|
355 |
['http://wcs.example.net/', os.path.join(alt_tempdir, 'hobo.json')])
|
355 |
356 |
pub_cfg = cPickle.load(open(os.path.join(alt_tempdir, 'wcs.example.net', 'config.pck')))
|
356 |
357 |
assert pub_cfg['language'] == {'language': 'fr'}
|