@@ -17,7 +17,10 @@ def setUp(self):
1717 # Creating Alpine Client in setUp Function for tests
1818 global alpine_client
1919 global login_info
20- alpine_client = APIClient (self .host , self .port )
20+ alpine_client = APIClient (self .host , self .port ,
21+ is_secure = self .is_secure ,
22+ validate_certs = self .validate_certs ,
23+ ca_certs = self .ca_certs )
2124 login_info = alpine_client .login (self .username , self .password )
2225
2326 global workspace_name
@@ -126,6 +129,13 @@ def test_run_workflow_variable_quote(self):
126129 workfile_id = alpine_client .workfile .get_id (workfile_name , workspace_id )
127130 process_id = alpine_client .workfile .process .run (workfile_id , variables )
128131 alpine_client .workfile .process .wait_until_finished (workfile_id , process_id )
132+
133+ def test_run_workflow_variable_single_quote_in_variable (self ):
134+ variables = [{"name" : "@min_credit_line" , "value" : "7" }, {"name" : "@outlook" , "value" : "'su\' nny'" }]
135+ workfile_id = alpine_client .workfile .get_id (workfile_name , workspace_id )
136+ process_id = alpine_client .workfile .process .run (workfile_id , variables )
137+ alpine_client .workfile .process .wait_until_finished (workfile_id , process_id )
138+
129139
130140 def test_query_workflow_status (self ):
131141 valid_workfile_status = ["WORKING" , "FINISHED" ]
@@ -151,7 +161,21 @@ def test_download_workflow_results(self):
151161 while workfile_status != "FINISHED" :
152162 time .sleep (1 )
153163 workfile_status = alpine_client .workfile .process .query_status (process_id )
154- response = alpine_client .workfile .process .download_results (workfile_id , process_id )
164+ results = alpine_client .workfile .process .download_results (workfile_id , process_id )
165+ results_metadata = alpine_client .workfile .process .get_metadata (results )
166+ start_time = results_metadata ['startTime' ] #u'2018-03-14T06:15:42.828-0700'
167+ end_time = results_metadata ['endTime' ] #u'2018-03-14T06:15:51.480-0700'
168+ status = results_metadata ['status' ] #Could be either u'FAILURE' or u'SUCCESS'
169+ print (status )
170+ numberOfError = results_metadata ['noOfError' ]
171+ if results_metadata ['noOfError' ] != 0 :
172+ for log_step in results ["logs" ]:
173+ errorMessage = log_step ["errMessage" ]
174+ if errorMessage != 'null' :
175+ nodeName = log_step ["nodeName" ]
176+ uuid = log_step ["uuid" ]
177+ print ("Error Message of Node {0} is: {1}" .format (uuid , errorMessage ))
178+ print (status )
155179
156180 def test_stop_workflow (self ):
157181 variables = [{"name" : "@min_credit_line" , "value" : "7" }]
0 commit comments