-
Notifications
You must be signed in to change notification settings - Fork 34
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
create controller_managed_device_groups #432
base: develop
Are you sure you want to change the base?
Conversation
tests/integration/targets/latest/tasks/controller_managed_device_groups.yml
Outdated
Show resolved
Hide resolved
that: | ||
- test_two['changed'] | ||
- test_two['controller_managed_device_group']['name'] == "Test Controller Group One" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the integration tests, we try and stick to a pattern like this:
- Create with minimal required fields
- Try and create again to verify idempotency
- Create a second object with all fields
- Try and create again to verify idempotency
- Update one of the previous objects
- Try and update again to verify idempotency
- Delete one of the previous objects
- Try and delete again to verify idempotency
Please refactor your tests to follow this pattern.
tests/integration/targets/latest/tasks/controller_managed_device_groups.yml
Outdated
Show resolved
Hide resolved
Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>
Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>
Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>
Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>
Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>
tests/integration/targets/latest/tasks/controller_managed_device_group.yml
Outdated
Show resolved
Hide resolved
url: "{{ nautobot_url }}" | ||
token: "{{ nautobot_token }}" | ||
name: Test Controller Group One | ||
weight: 2000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add an assertion to validate that this field did indeed change?
- test_three['changed'] | ||
- test_three['controller_managed_device_group']['name'] == "Test Controller Group One" | ||
- test_three['msg'] == "controller_managed_device_group Test Controller Group One updated" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a duplicate update test to verify idempotency
Hello @pugnacity, just checking in with this PR. Do you require any assistance or have you just not been able to dedicate any time to it lately? |
Hello @joewesch it's a combination of no time and problems to get the tests to work...locally it seems to work. but the pipeline doesn't like it. |
tests/integration/targets/latest/tasks/controller_managed_device_group.yml
Outdated
Show resolved
Hide resolved
- test_six['controller_managed_device_group'] == None | ||
- test_six['msg'] == "controller_managed_device_group Test Controller Group Two already absent" | ||
|
||
when: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block
and when
should no longer be needed as we do it in main.yml
now.
Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>
…ce_group.yml Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>
This should fix #423