mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-03-26 21:33:02 +00:00
Migrate k8s (#311)
* Use refactored module_utils Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Fix runner Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Fix runner Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Update runner.py * black runner Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Fix units Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Fix ResourceTimeout Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Attempt to fix 'Create custom resource' Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Update svc.find_resource(..., fail=True) Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Attempt to fix integration tests Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Fix apiVersion for Job Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Fix crd Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Add exception = None Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Fix apiVersion for definition Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Fix assert Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Fix returned results Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Update runner to return results accordingly Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Fix assert Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Add validate-missing Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Update client.py * Fix failures * Fix black formatting Co-authored-by: Mike Graves <mgraves@redhat.com>
This commit is contained in:
committed by
Mike Graves
parent
58a0fb1605
commit
3bf147580f
@@ -192,9 +192,8 @@ def test_service_retrieve_existing_resource(mock_pod_resource_instance):
|
||||
svc = K8sService(client, module)
|
||||
results = svc.retrieve(Mock(), pod_definition)
|
||||
|
||||
assert isinstance(results, dict)
|
||||
assert results["changed"] is False
|
||||
assert results["result"] == pod_definition
|
||||
assert isinstance(results, ResourceInstance)
|
||||
assert results.to_dict() == pod_definition
|
||||
|
||||
|
||||
def test_service_retrieve_no_existing_resource():
|
||||
@@ -205,9 +204,7 @@ def test_service_retrieve_no_existing_resource():
|
||||
svc = K8sService(client, module)
|
||||
results = svc.retrieve(Mock(), pod_definition)
|
||||
|
||||
assert isinstance(results, dict)
|
||||
assert results["changed"] is False
|
||||
assert results["result"] == {}
|
||||
assert results is None
|
||||
|
||||
|
||||
def test_create_project_request():
|
||||
|
||||
Reference in New Issue
Block a user