daemon: improve mocking of interfaces API tests #942

Merged
merged 15 commits into from Apr 14, 2016

Conversation

Projects
None yet
2 participants
Contributor

zyga commented Apr 14, 2016

This branch ports all of the tests related to the interfaces API to new mocking helpers. This is done so that subsequent branch, which enables connect/disconnect security, can reference the required state and work correctly.

zyga added some commits Apr 14, 2016

daemon: add helpers for mocking snaps in API tests
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
daemon: add differentProducerYaml for testing
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
daemon: port TestGetPlugs to new mock APIs
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
daemon: port TestConnectPlugSuccess to new mock APIs
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
daemon: port TestConnectPlugFailureInterfaceMismatch to new mock APIs
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
daemon: port TestConnectPlugFailureNoSuchPlug to new mock APIs
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
daemon: port TestConnectPlugFailureNoSuchSlot to new mock APIs
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
daemon: port TestDisconnectPlugSuccess to new mock APIs
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
daemon: port TestDisconnectPlugFailureNoSuchPlug to new mock APIs
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
daemon: port TestDisconnectPlugFailureNoSuchSlot to new mock APIs
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
daemon: port TestDisconnectPlugFailureNotConnected to new mock APIs
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
daemon: rename TestGetPlugs to TestInterfaces
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
daemon: remove older mock APIs
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
daemon: rename mock support file to _test
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

@niemeyer niemeyer merged commit f1a3b74 into snapcore:master Apr 14, 2016

4 checks passed

Integration tests Success
Details
autopkgtest Success
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 76.913%
Details

@zyga zyga deleted the zyga:daemon-test-cleanup branch Dec 12, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment