aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlas Kozat <ulas.kozat@gmail.com>2016-07-08 14:46:03 -0700
committerUlas Kozat <ulas.kozat@gmail.com>2016-07-08 14:46:03 -0700
commit5142bb823d7251ff52d4e3cc75487bfcf873e994 (patch)
tree844a87243848c8ca2719cf108a8dc09467af9643
parent7aaf46c22b09c76bb096b4e24b99f01ee978fcd9 (diff)
Upgrade run.sh to two-client case
Change-Id: I5c0d57430dcf9338930c5a1dcaa1553c82968de8 Signed-off-by: Ulas Kozat <ulas.kozat@gmail.com>
-rw-r--r--tests/logdata/client1.log62
-rw-r--r--tests/logdata/server.log75
-rw-r--r--tests/refdata/test1_client1.ref (renamed from tests/refdata/test1.ref)22
-rw-r--r--tests/refdata/test1_client2.ref8
-rwxr-xr-xtests/run.sh65
5 files changed, 151 insertions, 81 deletions
diff --git a/tests/logdata/client1.log b/tests/logdata/client1.log
index d234807..0376a0a 100644
--- a/tests/logdata/client1.log
+++ b/tests/logdata/client1.log
@@ -1,29 +1,33 @@
-07/01/2016 12:18:05 PM Domino Client Starting...
-07/01/2016 12:18:05 PM 1 Sending Registration
-07/01/2016 12:18:05 PM Registration Response: Response Code: 1
-07/01/2016 12:18:05 PM CLI Service is starting
-07/01/2016 12:18:05 PM RPC service for CLI is starting...
-07/01/2016 12:18:06 PM Received CLI ['heartbeat']
-07/01/2016 12:18:06 PM 12467 Sending heartbeat
-07/01/2016 12:18:06 PM heart beat received from: 0 ,sequence number: 1
-07/01/2016 12:18:07 PM Received CLI ['subscribe', '-t', 'hot', '-l', 'tosca.policies.Placement:properties:region:nova-1']
-07/01/2016 12:18:07 PM subscribing labels ['tosca.policies.Placement:properties:region:nova-1'] and templates ['hot']
-07/01/2016 12:18:07 PM Subscribe Response is received from: 0 ,sequence number: 2
-07/01/2016 12:18:08 PM Received CLI ['subscribe', '-t', 'dummy1,dummy2', '--top', 'OVERWRITE']
-07/01/2016 12:18:08 PM subscribing labels [] and templates ['dummy1', 'dummy2']
-07/01/2016 12:18:08 PM Subscribe Response is received from: 0 ,sequence number: 3
-07/01/2016 12:18:09 PM Received CLI ['subscribe', '-t', 'dummy1,dummy2', '--top', 'DELETE']
-07/01/2016 12:18:09 PM subscribing labels [] and templates ['dummy1', 'dummy2']
-07/01/2016 12:18:09 PM Subscribe Response is received from: 0 ,sequence number: 4
-07/01/2016 12:18:10 PM Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-2', 'sleep', '1']
-07/01/2016 12:18:10 PM subscribing labels ['tosca.policies.Placement:properties:region:nova-2'] and templates []
-07/01/2016 12:18:10 PM Subscribe Response is received from: 0 ,sequence number: 5
-07/01/2016 12:18:10 PM Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-3', '--lop', 'OVERWRITE']
-07/01/2016 12:18:10 PM subscribing labels ['tosca.policies.Placement:properties:region:nova-3'] and templates []
-07/01/2016 12:18:10 PM Subscribe Response is received from: 0 ,sequence number: 6
-07/01/2016 12:18:11 PM Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-3', '--lop', 'DELETE']
-07/01/2016 12:18:11 PM subscribing labels ['tosca.policies.Placement:properties:region:nova-3'] and templates []
-07/01/2016 12:18:11 PM Subscribe Response is received from: 0 ,sequence number: 7
-07/01/2016 12:18:12 PM Received CLI ['publish', '-t', './tosca-templates/tosca_helloworld_nfv.yaml']
-07/01/2016 12:18:12 PM Publishing the template file: ./tosca-templates/tosca_helloworld_nfv.yaml
-07/01/2016 12:18:12 PM Publish Response is received from: 0 ,sequence number: 8 Op. Status: 2
+07/08/2016 02:42:47 PM Domino Client Starting...
+07/08/2016 02:42:47 PM 1 Sending Registration
+07/08/2016 02:42:47 PM Registration Response: Response Code: 1
+07/08/2016 02:42:47 PM CLI Service is starting
+07/08/2016 02:42:47 PM RPC service for CLI is starting...
+07/08/2016 02:42:49 PM Received CLI ['heartbeat']
+07/08/2016 02:42:49 PM 12467 Sending heartbeat
+07/08/2016 02:42:49 PM heart beat received from: 0 ,sequence number: 2
+07/08/2016 02:42:50 PM Received CLI ['subscribe', '-t', 'hot', '-l', 'tosca.policies.Placement:properties:region:nova-1']
+07/08/2016 02:42:50 PM subscribing labels ['tosca.policies.Placement:properties:region:nova-1'] and templates ['hot']
+07/08/2016 02:42:50 PM Subscribe Response is received from: 0 ,sequence number: 3
+07/08/2016 02:42:51 PM Received CLI ['subscribe', '-t', 'dummy1,dummy2', '--top', 'OVERWRITE']
+07/08/2016 02:42:51 PM subscribing labels [] and templates ['dummy1', 'dummy2']
+07/08/2016 02:42:51 PM Subscribe Response is received from: 0 ,sequence number: 4
+07/08/2016 02:42:52 PM Received CLI ['subscribe', '-t', 'dummy1,dummy2', '--top', 'DELETE']
+07/08/2016 02:42:52 PM subscribing labels [] and templates ['dummy1', 'dummy2']
+07/08/2016 02:42:52 PM Subscribe Response is received from: 0 ,sequence number: 5
+07/08/2016 02:42:54 PM Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-2']
+07/08/2016 02:42:54 PM subscribing labels ['tosca.policies.Placement:properties:region:nova-2'] and templates []
+07/08/2016 02:42:54 PM Subscribe Response is received from: 0 ,sequence number: 6
+07/08/2016 02:42:55 PM Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-3', '--lop', 'OVERWRITE']
+07/08/2016 02:42:55 PM subscribing labels ['tosca.policies.Placement:properties:region:nova-3'] and templates []
+07/08/2016 02:42:55 PM Subscribe Response is received from: 0 ,sequence number: 7
+07/08/2016 02:42:56 PM Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-3', '--lop', 'DELETE']
+07/08/2016 02:42:56 PM subscribing labels ['tosca.policies.Placement:properties:region:nova-3'] and templates []
+07/08/2016 02:42:56 PM Subscribe Response is received from: 0 ,sequence number: 8
+07/08/2016 02:42:57 PM Received CLI ['publish', '-t', './tosca-templates/tosca_helloworld_nfv.yaml']
+07/08/2016 02:42:57 PM Publishing the template file: ./tosca-templates/tosca_helloworld_nfv.yaml
+07/08/2016 02:42:57 PM Publish Response is received from: 0 ,sequence number: 9 Op. Status: 2
+07/08/2016 02:42:58 PM Received CLI ['subscribe', '-l', 'tosca.policies.Placement.Geolocation:properties:region:us-west-1']
+07/08/2016 02:42:58 PM subscribing labels ['tosca.policies.Placement.Geolocation:properties:region:us-west-1'] and templates []
+07/08/2016 02:42:58 PM Subscribe Response is received from: 0 ,sequence number: 10
+07/08/2016 02:42:59 PM 12467 Received Template File
diff --git a/tests/logdata/server.log b/tests/logdata/server.log
index 57f1813..3a2682a 100644
--- a/tests/logdata/server.log
+++ b/tests/logdata/server.log
@@ -1,30 +1,45 @@
-07/01/2016 12:18:04 PM Domino Server Starting...
-07/01/2016 12:18:05 PM Registration Request received for UDID 12467 from IP: 192.168.254.12 port: 9091
-07/01/2016 12:18:06 PM heartbeat received from 12467
-07/01/2016 12:18:07 PM Subscribe Request received from 12467
-07/01/2016 12:18:07 PM APPENDING Labels...
-07/01/2016 12:18:07 PM Supported Template: set(['hot']) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-1'])
-07/01/2016 12:18:08 PM Subscribe Request received from 12467
-07/01/2016 12:18:08 PM APPENDING Labels...
-07/01/2016 12:18:08 PM Supported Template: set(['dummy2', 'dummy1']) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-1'])
-07/01/2016 12:18:09 PM Subscribe Request received from 12467
-07/01/2016 12:18:09 PM APPENDING Labels...
-07/01/2016 12:18:09 PM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-1'])
-07/01/2016 12:18:10 PM Subscribe Request received from 12467
-07/01/2016 12:18:10 PM APPENDING Labels...
-07/01/2016 12:18:10 PM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-2', 'tosca.policies.Placement:properties:region:nova-1'])
-07/01/2016 12:18:10 PM Subscribe Request received from 12467
-07/01/2016 12:18:10 PM OVERWRITING Labels...
-07/01/2016 12:18:10 PM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-3'])
-07/01/2016 12:18:11 PM Subscribe Request received from 12467
-07/01/2016 12:18:11 PM DELETING Labels...
-07/01/2016 12:18:11 PM Supported Template: set([]) Supported Labels: set([])
-07/01/2016 12:18:12 PM Publish Request received from 12467
-07/01/2016 12:18:12 PM ['tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0', '', 'description: Template for deploying a single server with predefined properties.', '', 'metadata:', ' template_name: TOSCA NFV Sample Template', '', 'policy_types:', ' tosca.policies.Placement.Geolocation:', ' description: Geolocation policy', ' derived_from: tosca.policies.Placement', '', 'topology_template:', ' node_templates:', ' VNF1:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf1', ' vendor: acmetelco', ' version: 1.0', '', ' VNF2:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf2', ' vendor: ericsson', ' version: 1.0', '', ' VNF3:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf3', ' vendor: huawei', ' version: 1.0', '', ' policies:', ' - rule1:', ' type: tosca.policies.Placement.Geolocation', ' targets: [ VNF1 ]', ' properties:', ' region: [ us-west-1 ]', ' - rule2:', ' type: tosca.policies.Placement.Geolocation', ' targets: [ VNF2, VNF3 ]', ' properties:', ' region: [ us-west-1 , us-west-2 ]']
-07/01/2016 12:18:12 PM nfv
-07/01/2016 12:18:12 PM nfv.py
-07/01/2016 12:18:12 PM The input "./toscafiles/template1.yaml" successfully passed validation.
-07/01/2016 12:18:12 PM Node Labels: {'VNF2': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF3': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF1': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1'])}
-07/01/2016 12:18:12 PM Site Maps: {'VNF2': set([]), 'VNF3': set([]), 'VNF1': set([])}
-07/01/2016 12:18:12 PM Selected Sites: {'VNF2': [], 'VNF3': [], 'VNF1': []}
-07/01/2016 12:18:12 PM Per domain file paths: {}
+07/08/2016 02:42:47 PM Domino Server Starting...
+07/08/2016 02:42:47 PM Registration Request received for UDID 12467 from IP: 192.168.254.12 port: 9091
+07/08/2016 02:42:48 PM Registration Request received for UDID 12467 from IP: 192.168.254.12 port: 9092
+07/08/2016 02:42:49 PM heartbeat received from 12467
+07/08/2016 02:42:50 PM Subscribe Request received from 12467
+07/08/2016 02:42:50 PM APPENDING Labels...
+07/08/2016 02:42:50 PM Supported Template: set(['hot']) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-1'])
+07/08/2016 02:42:51 PM Subscribe Request received from 12467
+07/08/2016 02:42:51 PM APPENDING Labels...
+07/08/2016 02:42:51 PM Supported Template: set(['dummy2', 'dummy1']) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-1'])
+07/08/2016 02:42:52 PM Subscribe Request received from 12467
+07/08/2016 02:42:52 PM APPENDING Labels...
+07/08/2016 02:42:52 PM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-1'])
+07/08/2016 02:42:54 PM Subscribe Request received from 12467
+07/08/2016 02:42:54 PM APPENDING Labels...
+07/08/2016 02:42:54 PM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-2', 'tosca.policies.Placement:properties:region:nova-1'])
+07/08/2016 02:42:55 PM Subscribe Request received from 12467
+07/08/2016 02:42:55 PM OVERWRITING Labels...
+07/08/2016 02:42:55 PM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-3'])
+07/08/2016 02:42:56 PM Subscribe Request received from 12467
+07/08/2016 02:42:56 PM DELETING Labels...
+07/08/2016 02:42:56 PM Supported Template: set([]) Supported Labels: set([])
+07/08/2016 02:42:57 PM Publish Request received from 12467
+07/08/2016 02:42:57 PM ['tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0', '', 'description: Template for deploying a single server with predefined properties.', '', 'metadata:', ' template_name: TOSCA NFV Sample Template', '', 'policy_types:', ' tosca.policies.Placement.Geolocation:', ' description: Geolocation policy', ' derived_from: tosca.policies.Placement', '', 'topology_template:', ' node_templates:', ' VNF1:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf1', ' vendor: acmetelco', ' version: 1.0', '', ' VNF2:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf2', ' vendor: ericsson', ' version: 1.0', '', ' VNF3:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf3', ' vendor: huawei', ' version: 1.0', '', ' policies:', ' - rule1:', ' type: tosca.policies.Placement.Geolocation', ' targets: [ VNF1 ]', ' properties:', ' region: [ us-west-1 ]', ' - rule2:', ' type: tosca.policies.Placement.Geolocation', ' targets: [ VNF2, VNF3 ]', ' properties:', ' region: [ us-west-1 , us-west-2 ]']
+07/08/2016 02:42:57 PM nfv
+07/08/2016 02:42:57 PM nfv.py
+07/08/2016 02:42:57 PM The input "./toscafiles/template1.yaml" successfully passed validation.
+07/08/2016 02:42:57 PM Node Labels: {'VNF2': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF3': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF1': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1'])}
+07/08/2016 02:42:57 PM Site Maps: {'VNF2': set([]), 'VNF3': set([]), 'VNF1': set([])}
+07/08/2016 02:42:57 PM Selected Sites: {'VNF2': [], 'VNF3': [], 'VNF1': []}
+07/08/2016 02:42:57 PM Per domain file paths: {}
+07/08/2016 02:42:58 PM Subscribe Request received from 12467
+07/08/2016 02:42:58 PM APPENDING Labels...
+07/08/2016 02:42:58 PM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1'])
+07/08/2016 02:42:59 PM Publish Request received from 4687831278552772781
+07/08/2016 02:42:59 PM ['tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0', '', 'description: Template for deploying a single server with predefined properties.', '', 'metadata:', ' template_name: TOSCA NFV Sample Template', '', 'policy_types:', ' tosca.policies.Placement.Geolocation:', ' description: Geolocation policy', ' derived_from: tosca.policies.Placement', '', 'topology_template:', ' node_templates:', ' VNF1:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf1', ' vendor: acmetelco', ' version: 1.0', '', ' VNF2:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf2', ' vendor: ericsson', ' version: 1.0', '', ' VNF3:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf3', ' vendor: huawei', ' version: 1.0', '', ' policies:', ' - rule1:', ' type: tosca.policies.Placement.Geolocation', ' targets: [ VNF1 ]', ' properties:', ' region: [ us-west-1 ]', ' - rule2:', ' type: tosca.policies.Placement.Geolocation', ' targets: [ VNF2, VNF3 ]', ' properties:', ' region: [ us-west-1 , us-west-2 ]']
+07/08/2016 02:42:59 PM ERRNO 17; ./toscafiles/ exists. Creating: ./toscafiles/template1.yaml
+07/08/2016 02:42:59 PM nfv
+07/08/2016 02:42:59 PM nfv.py
+07/08/2016 02:42:59 PM The input "./toscafiles/template1.yaml" successfully passed validation.
+07/08/2016 02:42:59 PM Node Labels: {'VNF2': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF3': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF1': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1'])}
+07/08/2016 02:42:59 PM Site Maps: {'VNF2': set([]), 'VNF3': set([]), 'VNF1': set([12467])}
+07/08/2016 02:42:59 PM Selected Sites: {'VNF2': [], 'VNF3': [], 'VNF1': 12467}
+07/08/2016 02:42:59 PM Per domain file paths: {12467: './toscafiles/template_part12467.yaml'}
+07/08/2016 02:42:59 PM Push Response received from 12467
diff --git a/tests/refdata/test1.ref b/tests/refdata/test1_client1.ref
index edb865a..658b0e6 100644
--- a/tests/refdata/test1.ref
+++ b/tests/refdata/test1_client1.ref
@@ -5,25 +5,29 @@ CLI Service is starting
RPC service for CLI is starting...
Received CLI ['heartbeat']
12467 Sending heartbeat
-heart beat received from: 0 ,sequence number: 1
+heart beat received from: 0 ,sequence number: 2
Received CLI ['subscribe', '-t', 'hot', '-l', 'tosca.policies.Placement:properties:region:nova-1']
subscribing labels ['tosca.policies.Placement:properties:region:nova-1'] and templates ['hot']
-Subscribe Response is received from: 0 ,sequence number: 2
+Subscribe Response is received from: 0 ,sequence number: 3
Received CLI ['subscribe', '-t', 'dummy1,dummy2', '--top', 'OVERWRITE']
subscribing labels [] and templates ['dummy1', 'dummy2']
-Subscribe Response is received from: 0 ,sequence number: 3
+Subscribe Response is received from: 0 ,sequence number: 4
Received CLI ['subscribe', '-t', 'dummy1,dummy2', '--top', 'DELETE']
subscribing labels [] and templates ['dummy1', 'dummy2']
-Subscribe Response is received from: 0 ,sequence number: 4
-Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-2', 'sleep', '1']
-subscribing labels ['tosca.policies.Placement:properties:region:nova-2'] and templates []
Subscribe Response is received from: 0 ,sequence number: 5
+Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-2']
+subscribing labels ['tosca.policies.Placement:properties:region:nova-2'] and templates []
+Subscribe Response is received from: 0 ,sequence number: 6
Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-3', '--lop', 'OVERWRITE']
subscribing labels ['tosca.policies.Placement:properties:region:nova-3'] and templates []
-Subscribe Response is received from: 0 ,sequence number: 6
+Subscribe Response is received from: 0 ,sequence number: 7
Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-3', '--lop', 'DELETE']
subscribing labels ['tosca.policies.Placement:properties:region:nova-3'] and templates []
-Subscribe Response is received from: 0 ,sequence number: 7
+Subscribe Response is received from: 0 ,sequence number: 8
Received CLI ['publish', '-t', './tosca-templates/tosca_helloworld_nfv.yaml']
Publishing the template file: ./tosca-templates/tosca_helloworld_nfv.yaml
-Publish Response is received from: 0 ,sequence number: 8 Op. Status: 2
+Publish Response is received from: 0 ,sequence number: 9 Op. Status: 2
+Received CLI ['subscribe', '-l', 'tosca.policies.Placement.Geolocation:properties:region:us-west-1']
+subscribing labels ['tosca.policies.Placement.Geolocation:properties:region:us-west-1'] and templates []
+Subscribe Response is received from: 0 ,sequence number: 10
+12467 Received Template File
diff --git a/tests/refdata/test1_client2.ref b/tests/refdata/test1_client2.ref
new file mode 100644
index 0000000..29afa6b
--- /dev/null
+++ b/tests/refdata/test1_client2.ref
@@ -0,0 +1,8 @@
+Domino Client Starting...
+1 Sending Registration
+Registration Response: Response Code: 1
+CLI Service is starting
+RPC service for CLI is starting...
+Received CLI ['publish', '-t', './tosca-templates/tosca_helloworld_nfv.yaml']
+Publishing the template file: ./tosca-templates/tosca_helloworld_nfv.yaml
+Publish Response is received from: 0 ,sequence number: 11 Op. Status: 1
diff --git a/tests/run.sh b/tests/run.sh
index bf92609..54d47b7 100755
--- a/tests/run.sh
+++ b/tests/run.sh
@@ -18,9 +18,11 @@ CLIENT2_CLIPORT=9200
LOGLEVEL=DEBUG
toscafile_test1=./tosca-templates/tosca_helloworld_nfv.yaml
-test1_reffile=./tests/refdata/test1.ref
+test1_reffile1=./tests/refdata/test1_client1.ref
+test1_reffile2=./tests/refdata/test1_client2.ref
+test1_reffile3=./tests/refdata/test1_server.ref
client1_log=./tests/logdata/client1.log
-server_log=./tests/logdata/server.log
+client2_log=./tests/logdata/client2.log
start_server() {
pgrep -f "python DominoServer.py" && return 0
@@ -34,12 +36,18 @@ stop_server() {
}
start_client1() {
- pgrep -f "python DominoClient.py" && return 0
+ #pgrep -f "python DominoClient.py -p $CLIENT1_PORT" && return 0
python DominoClient.py -p $CLIENT1_PORT --cliport $CLIENT1_CLIPORT \
--log "$LOGLEVEL" > "$client1_log" 2>&1 &
}
-stop_client1() {
+start_client2() {
+ #pgrep -f "python DominoClient.py -p $CLIENT2_PORT" && return 0
+ python DominoClient.py -p $CLIENT2_PORT --cliport $CLIENT2_CLIPORT \
+ --log "$LOGLEVEL" > "$client2_log" 2>&1 &
+}
+
+stop_clients() {
pgrep -f "python DominoClient.py" || return 0
kill $(pgrep -f "python DominoClient.py")
#cat client1.log
@@ -59,23 +67,35 @@ cleanup() {
set +e
echo "cleanup..."
- echo "Stopping Domino Client 1..."
- stop_client1
+ echo "Stopping Domino Clients..."
+ stop_clients
echo "Stopping Domino Server..."
stop_server
- if [ -f file1 ]; then
- rm file1
- fi
+# if [ -f file1 ]; then
+# rm file1
+# fi
+
+# if [ -f file2 ]; then
+# rm file2
+# fi
}
echo "domino/tests/run.sh has been executed."
trap cleanup EXIT
+echo "Terminating any running Domino Clients..."
+stop_clients
+
+echo "Terminating any running Domino Servers..."
+stop_server
+sleep 1
+
echo "Cleaning residue files and folders from previous runs..."
clean_directories
+sleep 1
echo "Launching Domino Server..."
start_server
@@ -85,6 +105,10 @@ echo "Launching Domino Client 1..."
start_client1
sleep 1
+echo "Launching Domino Client 2..."
+start_client2
+sleep 1
+
echo "Test Heartbeat"
python domino-cli.py $CLIENT1_CLIPORT heartbeat
sleep 1
@@ -98,7 +122,7 @@ sleep 1
python domino-cli.py $CLIENT1_CLIPORT subscribe -t dummy1,dummy2 --top DELETE
sleep 1
python domino-cli.py $CLIENT1_CLIPORT subscribe \
- -l tosca.policies.Placement:properties:region:nova-2 \
+ -l tosca.policies.Placement:properties:region:nova-2
sleep 1
python domino-cli.py $CLIENT1_CLIPORT subscribe \
-l tosca.policies.Placement:properties:region:nova-3 \
@@ -113,6 +137,10 @@ echo "Test Publish API"
python domino-cli.py $CLIENT1_CLIPORT publish -t "$toscafile_test1"
sleep 1
+python domino-cli.py $CLIENT1_CLIPORT subscribe \
+ -l tosca.policies.Placement.Geolocation:properties:region:us-west-1
+sleep 1
+python domino-cli.py $CLIENT2_CLIPORT publish -t "$toscafile_test1"
#echo "Stopping Domino Client 1..."
#stop_client1
@@ -121,15 +149,26 @@ sleep 1
#stop_server
cut -d " " -f 4- "$client1_log" > file1
+cut -d " " -f 4- "$client2_log" > file2
#will use the form below to declare success or failure
set +e
-diff -q file1 "$test1_reffile" 1>/dev/null
+
+diff -q file1 "$test1_reffile1" 1>/dev/null
if [[ $? == "0" ]]
then
- echo "SUCCESS"
+ echo "Log1 PASS"
else
- echo "FAILURE"
+ echo "Log1 FAIL"
fi
+
+diff -q file2 "$test1_reffile2" 1>/dev/null
+if [[ $? == "0" ]]
+then
+ echo "Log2 PASS"
+else
+ echo "Log2 FAIL"
+fi
+
set -e
echo "done"