Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed May 15, 2024
1 parent aa5a059 commit e4cb128
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/unit/connectors/Kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ def get_response(self, method, url, verify, headers, data):
'{"configMap": {"name": "configmap"}}, {"secret": {"secretName": "secret"}}]}}')
if url == "/api/v1/namespaces/somenamespace":
resp.status_code = 200
resp.json.return_value = {'apiVersion': 'v1', 'kind': 'Namespace',
'metadata': {'name': 'somenamespace', 'labels': {'inf_id': 'infid'}}}
elif method == "POST":
if url.endswith("/pods"):
resp.status_code = 201
Expand Down Expand Up @@ -427,6 +429,9 @@ def test_60_finalize(self, requests):
('DELETE',
'http://server.com:8080/apis/networking.k8s.io/v1/namespaces/somenamespace/ingresses/1'))
self.assertEqual(requests.call_args_list[7][0],
('GET',
'http://server.com:8080/api/v1/namespaces/somenamespace'))
self.assertEqual(requests.call_args_list[8][0],
('DELETE',
'http://server.com:8080/api/v1/namespaces/somenamespace'))
self.assertTrue(success, msg="ERROR: finalizing VM info.")
Expand Down

0 comments on commit e4cb128

Please sign in to comment.