summaryrefslogtreecommitdiffstats
path: root/pgaas/tests/test_plugin.py
diff options
context:
space:
mode:
authorHansen, Tony (th1395) <th1395@att.com>2018-03-28 20:51:00 +0000
committerHansen, Tony (th1395) <th1395@att.com>2018-03-28 21:20:10 +0000
commitadcb1dfaf4d88062c11630fee59eacb15965c373 (patch)
tree09d47c8ce2db298fe9b651d65ab8022d88a34c67 /pgaas/tests/test_plugin.py
parent0dc92cb05329fb28e8cabfc276e9a9993ce47b7a (diff)
add capability to take over an existing DB
add ability to take a port as part of the hostname add IPv6 support as [IPv6address] or [IPv6address]:port Change-Id: Ia7a7309f7964b64fa65b0fa98891e529d7765056 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/test_plugin.py')
-rw-r--r--pgaas/tests/test_plugin.py23
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: