Skip to content

Commit

Permalink
config invoke
Browse files Browse the repository at this point in the history
  • Loading branch information
lfkdev committed Jun 30, 2024
1 parent 696f3ff commit 0f43e42
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/test_ansible_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ def setUpClass(cls):
cls.app = init_app()
cls.client = cls.app.test_client()
cls.app.testing = True

cls.job_storage = cls.app.config['job_storage']

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

def test_job_creation_and_retrieval(self):
config = load_config()
payload = {
'playbook': 'test_playbook.yml',
'inventory': 'test_inventory.ini',
Expand All @@ -63,10 +62,10 @@ def test_job_creation_and_retrieval(self):

time.sleep(2)

job_file_path = Path(self.config['job_storage_dir']) / f"{job_id}.json"
job_file_path = Path(config['job_storage_dir']) / f"{job_id}.json"
self.assertTrue(job_file_path.exists(), f"Job file {job_file_path} does not exist")

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

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

0 comments on commit 0f43e42

Please sign in to comment.