Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit tests for kubevirt modules #52558

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
7 participants
@machacekondra
Copy link
Contributor

machacekondra commented Feb 19, 2019

SUMMARY

This PR Add unit tests for Kubevirt modules.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

kubevirt

ADDITIONAL INFORMATION

@machacekondra machacekondra force-pushed the machacekondra:kubevirt_unit_tets branch 4 times, most recently from 4d93e43 to 5cfaad4 Feb 19, 2019

@machacekondra machacekondra force-pushed the machacekondra:kubevirt_unit_tets branch from 5cfaad4 to f501856 Feb 19, 2019

@machacekondra machacekondra force-pushed the machacekondra:kubevirt_unit_tets branch from f501856 to cdad908 Feb 19, 2019

@machacekondra

This comment has been minimized.

Copy link
Contributor Author

machacekondra commented Feb 19, 2019

@samdoran samdoran removed the needs_triage label Feb 19, 2019

@mmazur

This comment has been minimized.

Copy link
Contributor

mmazur commented Feb 20, 2019

+1

@pkliczewski

This comment has been minimized.

Copy link

pkliczewski commented Feb 20, 2019

shipit

@machacekondra

This comment has been minimized.

Copy link
Contributor Author

machacekondra commented Feb 20, 2019

@Akasurde @gundalow Can you please review?

@machacekondra

This comment has been minimized.

Copy link
Contributor Author

machacekondra commented Feb 21, 2019

bot_status

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Feb 21, 2019

Components

test/units/modules/cloud/kubevirt/test_kubevirt.py
support: core
maintainers:

test/units/modules/cloud/kubevirt/test_kubevirt_definition.py
support: core
maintainers:

test/units/modules/cloud/kubevirt/test_kubevirt_preset.py
support: core
maintainers:

test/units/modules/cloud/kubevirt/test_kubevirt_scale_rs.py
support: core
maintainers:

test/units/modules/cloud/kubevirt/test_kubevirt_vm.py
support: core
maintainers:

test/units/modules/cloud/kubevirt/utils.py
support: core
maintainers:

Metadata

waiting_on: ansible
changes_requested_by: null
needs_info: False
needs_revision: False
needs_rebase: False
merge_commits: []
too many files or commits: False
mergeable_state: clean
shippable_status: success
maintainer_shipits (module maintainers): 0
community_shipits (namespace maintainers): 0
ansible_shipits (core team members): 0
shipit_actors (maintainer or core team member): []
shipit_actors_other: mmazur pkliczewski
automerge: automerge shipit test failed

click here for bot help

@Akasurde

This comment has been minimized.

Copy link
Member

Akasurde commented Feb 26, 2019

@mattclay Could you please take a look into this ? Thanks.

from ansible.module_utils.k8s.common import K8sAnsibleMixin
from ansible.module_utils.k8s.raw import KubernetesRawModule

openshift = pytest.importorskip("openshift", minversion="0.6.2")

This comment has been minimized.

@mattclay

mattclay Feb 28, 2019

Member

Instead of importing openshift, have you considered mocking the import instead?

Take a look at #50850 for an example of how this can be done.

This comment has been minimized.

@machacekondra

machacekondra Mar 5, 2019

Author Contributor

Would be much better approach. But we have integration tests with real world scenarios, so I think these unittest are good enough.

@ansibot ansibot added the stale_ci label Feb 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.