aboutsummaryrefslogtreecommitdiffstats
path: root/moon_orchestrator/tests/unit_python/mock_pods.py
diff options
context:
space:
mode:
authorReemMahmoud <rfawzy.ext@orange.com>2018-03-22 12:06:48 +0200
committersgdt6900 <rhanafy.ext@orange.com>2018-03-26 16:28:53 +0200
commit7cf97412a3e8059c4ddd0a471bc3095a7b5a266b (patch)
tree389c4b9c5587d09699e7e92d1e1d89b0d7b3fe5e /moon_orchestrator/tests/unit_python/mock_pods.py
parent6d2dbd0af7da445b39bbb7e16a36260268c685cd (diff)
Add more tests and fix bug in moon_orchestrator
adding more validation adding more test cases covering pods, slaves applying comments mentioned Change-Id: I7e58f184a3f216fc3740097244a5538c184bd940 Signed-off-by: ReemMahmoud <rfawzy.ext@orange.com>
Diffstat (limited to 'moon_orchestrator/tests/unit_python/mock_pods.py')
-rw-r--r--moon_orchestrator/tests/unit_python/mock_pods.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/moon_orchestrator/tests/unit_python/mock_pods.py b/moon_orchestrator/tests/unit_python/mock_pods.py
index 84e6c7ea..59e1b3c0 100644
--- a/moon_orchestrator/tests/unit_python/mock_pods.py
+++ b/moon_orchestrator/tests/unit_python/mock_pods.py
@@ -208,12 +208,25 @@ def patch_k8s(monkeypatch):
'create_namespaced_deployment',
create_namespaced_deployment_mockreturn)
+ def delete_namespaced_deployment_mockreturn(*args, **kwargs):
+ return None
+
+ monkeypatch.setattr(client.ExtensionsV1beta1Api,
+ 'delete_namespaced_deployment',
+ delete_namespaced_deployment_mockreturn)
+
def create_namespaced_service_mockreturn(*args, **kwargs):
return {}
monkeypatch.setattr(client.CoreV1Api,
'create_namespaced_service',
create_namespaced_service_mockreturn)
+ def delete_namespaced_service_mockreturn(*args, **kwargs):
+ return {}
+ monkeypatch.setattr(client.CoreV1Api,
+ 'delete_namespaced_service',
+ delete_namespaced_service_mockreturn)
+
def register_pods(m):
""" Modify the response from Requests module