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 integration test for #868 #901

Merged
merged 2 commits into from
May 19, 2021
Merged

Conversation

TheRealFalcon
Copy link
Member

Proposed Commit Message

Add integration test for #868

Ensure no Traceback when 'chef_license' is set

Additional Context

Test Steps

pytest tests/integration_tests/bugs/test_gh868.py

Checklist:

  • My code follows the process laid out in the documentation
  • I have updated or added any unit tests accordingly
  • I have updated or added any documentation accordingly

USERDATA = """\
#cloud-config
chef:
install_type: omnibus
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any concerns about this being in an integration test? This causes chef to install from https://www.chef.io/chef/install.sh

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this test because it tests a realworld application/use-case all the way to the source.

All good to have the remote script source. I don't mind this for two reasons:

  • security: not concerned as it's a short-lived instance that is torn down immediately after the test run
  • scripts on the internet changing which break our tests: let's deal/cope with that only if we find that this test is really flaky due to changes in the script.

Are there other concerns you had in mind?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just from a "good steward" point of view, but I can't image our jenkins runs would be more than a blip compared to the number of hits it receives.

Only reason I thought of it was because we have an older cloud test for chef that is disabled because it relies on a 3rd party repo. https://github.com/canonical/cloud-init/blob/master/tests/cloud_tests/testcases/examples/install_run_chef_recipes.yaml#L4

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with us keeping this for now. That commit where we disabled was pointing to https://bugs.launchpad.net/cloud-init/+bug/1678145 which was basically a "don't let things on the internet break us when they change". If this ends up breaking repeatedly and causing maintenance problems, We can spend time to remedy/cache it or something else.

Ensure no Traceback when 'chef_license' is set
Copy link
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on this integration test.

@blackboxsw blackboxsw merged commit 3611bef into canonical:master May 19, 2021
@TheRealFalcon TheRealFalcon deleted the chef-test branch August 19, 2021 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants