File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,6 @@ def setUpClass(cls):
12
12
cls .app = init_app ()
13
13
cls .client = cls .app .test_client ()
14
14
cls .app .testing = True
15
-
16
- cls .job_storage = cls .app .config ['job_storage' ]
17
15
18
16
def test_health_check (self ):
19
17
response = self .client .get ('/health' )
@@ -51,6 +49,7 @@ def test_playbook_endpoint(self):
51
49
self .assertEqual (data ['status' ], 'running' )
52
50
53
51
def test_job_creation_and_retrieval (self ):
52
+ config = load_config ()
54
53
payload = {
55
54
'playbook' : 'test_playbook.yml' ,
56
55
'inventory' : 'test_inventory.ini' ,
@@ -63,10 +62,10 @@ def test_job_creation_and_retrieval(self):
63
62
64
63
time .sleep (2 )
65
64
66
- job_file_path = Path (self . config ['job_storage_dir' ]) / f"{ job_id } .json"
65
+ job_file_path = Path (config ['job_storage_dir' ]) / f"{ job_id } .json"
67
66
self .assertTrue (job_file_path .exists (), f"Job file { job_file_path } does not exist" )
68
67
69
- job_folder_path = Path (self . config ['job_storage_dir' ]) / job_id
68
+ job_folder_path = Path (config ['job_storage_dir' ]) / job_id
70
69
self .assertTrue (job_folder_path .exists (), f"Job folder { job_folder_path } does not exist" )
71
70
72
71
response = self .client .get (f'{ API_PATH } /ansible/job/{ job_id } ' )
You can’t perform that action at this time.
0 commit comments