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

many: avoid snap.InfoFromSnapYaml in tests #1966

Merged
merged 4 commits into from
Sep 21, 2016

Conversation

pedronis
Copy link
Collaborator

This branch switches all of the interface/ code from snap.InfoFromSnapYaml, which does no validation, to the new snaptest.MockInfo (similar to the existing MockSnap). This ensures that YAML data in tests is accurately testing how the system would behave in a given situation by preventing invalid YAML to silently cause issues.

zyga and others added 3 commits September 21, 2016 14:30
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
This patch replaces each use of snap.InfoFromSnapYAML with
snaptest.MockInfo that does extra validation and prevents people from
writing test that are not representative of what is allowed in practice.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
@niemeyer
Copy link
Contributor

This is a pick up from #1961.

@niemeyer niemeyer merged commit 1ca20d5 into canonical:master Sep 21, 2016
@pedronis pedronis deleted the snaptest-support branch September 22, 2016 11:38
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.

3 participants