diff options
author | Hansen, Tony (th1395) <th1395@att.com> | 2018-03-29 15:03:41 +0000 |
---|---|---|
committer | Hansen, Tony (th1395) <th1395@att.com> | 2018-04-05 13:54:52 +0000 |
commit | 43b5cf23a5031f39fd4fdb4fe4d936e5b81d23c2 (patch) | |
tree | 4580d1b73a7f7ff1c837a10c43a25f6ab5a7fda6 /pgaas/tests | |
parent | 2fcc882d69dc4a59846ef2ff6b352e40c3f5cf49 (diff) |
Revert "Revert "add capability to take over ...""
This reverts commit 2fcc882d69dc4a59846ef2ff6b352e40c3f5cf49.
Resolve comments from Jack
Change-Id: I8e4ff9a04452a3fa5704b948126b508e78e94bdc
Signed-off-by: Hansen, Tony (th1395) <th1395@att.com>
Issue-ID: CCSDK-228
Signed-off-by: Hansen, Tony (th1395) <th1395@att.com>
Diffstat (limited to 'pgaas/tests')
-rw-r--r-- | pgaas/tests/test_plugin.py | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/pgaas/tests/test_plugin.py b/pgaas/tests/test_plugin.py index 5561f16..197654e 100644 --- a/pgaas/tests/test_plugin.py +++ b/pgaas/tests/test_plugin.py @@ -1,7 +1,7 @@ # ============LICENSE_START==================================================== # org.onap.ccsdk # ============================================================================= -# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. # ============================================================================= # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -60,6 +60,15 @@ class MockRuntimeProperties(object): def runtime_properties(self): return self._runtime_properties +class MockSocket(object): + def __init__(self): + pass + def connect(self,host=None,port=None): + pass + def close(self): + pass + + def _connect(h,p): return { } @@ -70,7 +79,9 @@ def set_mock_context(msg, monkeypatch): 'writerfqdn': 'test.bar.example.com', 'use_existing': False, 'readerfqdn': 'test-ro.bar.example.com', - 'name': 'testdb' + 'name': 'testdb', + 'port': '5432', + 'initialpassword': 'test' } sshkeyprops = { @@ -108,14 +119,6 @@ def test_add_pgaas_cluster(monkeypatch): current_ctx.clear() os.system("echo After test; ls -l /tmp/pgaas") #### DELETE -class MockSocket(object): - def __init__(self): - pass - def connect(self,host=None,port=None): - pass - def close(self): - pass - @pytest.mark.dependency(depends=['test_add_pgaas_cluster']) def test_add_database(monkeypatch): try: |