Skip to content

Commit 0f43e42

Browse files
committed
config invoke
1 parent 696f3ff commit 0f43e42

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/test_ansible_link.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ def setUpClass(cls):
1212
cls.app = init_app()
1313
cls.client = cls.app.test_client()
1414
cls.app.testing = True
15-
16-
cls.job_storage = cls.app.config['job_storage']
1715

1816
def test_health_check(self):
1917
response = self.client.get('/health')
@@ -51,6 +49,7 @@ def test_playbook_endpoint(self):
5149
self.assertEqual(data['status'], 'running')
5250

5351
def test_job_creation_and_retrieval(self):
52+
config = load_config()
5453
payload = {
5554
'playbook': 'test_playbook.yml',
5655
'inventory': 'test_inventory.ini',
@@ -63,10 +62,10 @@ def test_job_creation_and_retrieval(self):
6362

6463
time.sleep(2)
6564

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"
6766
self.assertTrue(job_file_path.exists(), f"Job file {job_file_path} does not exist")
6867

69-
job_folder_path = Path(self.config['job_storage_dir']) / job_id
68+
job_folder_path = Path(config['job_storage_dir']) / job_id
7069
self.assertTrue(job_folder_path.exists(), f"Job folder {job_folder_path} does not exist")
7170

7271
response = self.client.get(f'{API_PATH}/ansible/job/{job_id}')

0 commit comments

Comments
 (0)