Skip to content

Apt configure yaml test#108

Merged
blackboxsw merged 4 commits into
cloud-init:masterfrom
lucasmoura:apt_configure_yaml_test
Jun 11, 2020
Merged

Apt configure yaml test#108
blackboxsw merged 4 commits into
cloud-init:masterfrom
lucasmoura:apt_configure_yaml_test

Conversation

@lucasmoura
Copy link
Copy Markdown

Manual verification for #357

Copy link
Copy Markdown
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.

minor change for the schema validation template and we'll land it

Comment thread bugs/gh-357.txt Outdated
Comment on lines +153 to +157
echo "Expect schema failure on invalid_apt"
if [ "$SERIES" = "xenial" ]; then
echo "Xenial does not have jsonschema dependecy, making this type of checking to not work on it"
fi
lxc exec $name -- cloud-init devel schema -c /var/tmp/invalid_apt.yaml
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

as with your other PR let's just pull this logic into the xenial non-xenial case

Suggested change
echo "Expect schema failure on invalid_apt"
if [ "$SERIES" = "xenial" ]; then
echo "Xenial does not have jsonschema dependecy, making this type of checking to not work on it"
fi
lxc exec $name -- cloud-init devel schema -c /var/tmp/invalid_apt.yaml
if [ "$SERIES" = "xenial" ]; then
echo "Xenial does not have jsonschema dependecy, making this type of checking to not work on it"
lxc exec $name -- cloud-init devel schema -c /var/tmp/invalid_apt.yaml && echo "SUCCESS: xenial allowed invalid schema because it lacks python3-jsonschema dep" || echo "FAILURE: Xenial failed invalid_schema which it should have passed"
else
echo "Expect schema failure on invalid_apt"
lxc exec $name -- cloud-init devel schema -c /var/tmp/invalid_apt.yaml || echo "SUCCESS: rejected invalid schema"
fi

Comment thread bugs/gh-357.txt
lxc file push invalid_apt.yaml $name/var/tmp/

lxc exec $name -- cloud-init status --wait --long
lxc exec $name -- cloud-init devel schema -c /var/tmp/invalid_apt.yaml || echo "FAILURE"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's just add an echo

Suggested change
lxc exec $name -- cloud-init devel schema -c /var/tmp/invalid_apt.yaml || echo "FAILURE"
echo "Expecting no failures on invalid schema pre-upgrade because no schema apt defined"
lxc exec $name -- cloud-init devel schema -c /var/tmp/invalid_apt.yaml || echo "FAILURE"

@lucasmoura lucasmoura force-pushed the apt_configure_yaml_test branch from 655aca1 to 5ff2583 Compare June 11, 2020 13:23
@lucasmoura lucasmoura force-pushed the apt_configure_yaml_test branch from 5ff2583 to f5c6772 Compare June 11, 2020 13:35
@lucasmoura
Copy link
Copy Markdown
Author

@blackboxsw done

@lucasmoura lucasmoura requested a review from blackboxsw June 11, 2020 13:35
Copy link
Copy Markdown
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 thanks

@blackboxsw blackboxsw merged commit 248dfdd into cloud-init:master Jun 11, 2020
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.

2 participants