Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Use KinD cluster with Molecule for full integration tests #22

Merged
merged 6 commits into from
Feb 13, 2020

Conversation

geerlingguy
Copy link
Collaborator

SUMMARY

Closes #10

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

CI

ADDITIONAL INFORMATION

N/A

@codecov-io
Copy link

codecov-io commented Feb 12, 2020

Codecov Report

Merging #22 into master will increase coverage by 26.33%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #22       +/-   ##
===========================================
+ Coverage   16.95%   43.28%   +26.33%     
===========================================
  Files           2        3        +1     
  Lines         525      536       +11     
  Branches      108      109        +1     
===========================================
+ Hits           89      232      +143     
+ Misses        436      261      -175     
- Partials        0       43       +43
Flag Coverage Δ
#_ 43.28% <ø> (+26.33%) ⬆️
Impacted Files Coverage Δ
plugins/modules/k8s.py 90.9% <0%> (ø)
plugins/module_utils/common.py 50.68% <0%> (+19.17%) ⬆️
plugins/module_utils/raw.py 39.05% <0%> (+27.7%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cec46a0...bc51213. Read the comment docs.

@geerlingguy
Copy link
Collaborator Author

geerlingguy commented Feb 13, 2020

@fabianvf / @marwatk - I'm trying to get the existing tests working on a KinD cluster in K8s 1.17, and it seems the only fail I'm currently getting is the new test that was added in ansible/ansible#57418 to resolve ansible/ansible#56640 — when running the tasks, the assert fails:

    TASK [assert that validate_certs caused a failure (and therefore was correctly translated to verify_ssl)] ***
    fatal: [localhost]: FAILED! => {
        "assertion": "output is failed",
        "changed": false,
        "evaluated_to": false,
        "msg": "Assertion failed"
    }

For now I think I might comment out those tasks and create a follow-up issue to look at it again, just so we can get the full test suite running in CI.

Edit: Opened follow-up issue https://github.com/ansible-collections/kubernetes/issues/24

@geerlingguy
Copy link
Collaborator Author

geerlingguy commented Feb 13, 2020

Currently breaking on GitHub with:

    TASK [Check that daemonset wait worked] ****************************************
    fatal: [localhost]: FAILED! => {
        "assertion": "updated_ds_pods.resources[0].spec.containers[0].image.endswith(\":3\")",
        "changed": false,
        "evaluated_to": false,
        "msg": "Assertion failed"
    }

Works locally, though :/

Edit: Apparently it was a one-off... might need more time to wait or something, but it worked when I threw a debug statement in. Will try removing that again.

@geerlingguy
Copy link
Collaborator Author

geerlingguy commented Feb 13, 2020

Now getting:

    TASK [Check that paused deployment wait worked] ********************************
257
    fatal: [localhost]: FAILED! => {"msg": "The conditional check 'condition.reason == \"DeploymentPaused\"' failed. The error was: An unhandled exception occurred while templating '{{ pause_deploy.result.status.conditions | json_query(\"[?type==`Progressing`]\") | first }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: template error while templating string: no filter named 'json_query'. String: {{ pause_deploy.result.status.conditions | json_query(\"[?type==`Progressing`]\") | first }}"}

I'll have to see where that filter's coming from, or find a different way to get at the data.

Edit: Opened follow-up issue #23 — for now I'll try grabbing community.general to get the filter.

@geerlingguy
Copy link
Collaborator Author

Two other ansible/ansible follow-ups as a result of this work:

@geerlingguy
Copy link
Collaborator Author

Need to rebase and clean up the commits here... will do that soon.

@geerlingguy geerlingguy marked this pull request as ready for review February 13, 2020 22:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants