overlord/ifacestate: reload snap connections when setting up security for a given snap #950

Merged
merged 9 commits into from Apr 14, 2016

Conversation

Projects
None yet
2 participants
Contributor

zyga commented Apr 14, 2016

This branch ensures that a connection that was established is kept around when setup-snap-security is used.

zyga added some commits Apr 14, 2016

overlord/ifacestate: fix addSetupSnapSecurityChange to use snapName
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
interfaces/overlord: create setupSecurity helper and use it
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
overlord/ifacestate: allow reloadConnections to be scoped to a single…
… snap

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
overlord/ifacestate: use setupSecurity in doSetupSnapSecurity
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
overlord/ifacestate: reload snap connections in do-setup-security
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
@@ -336,6 +336,46 @@ func (s *interfaceManagerSuite) TestDoSetupSnapSecuirtyKeepsExistingConnectionSt
})
}
+func (s *interfaceManagerSuite) TestDoSetupSnapSecuirtyReloadsConnectionsWhenInvokedOnPlugSide(c *C) {
@niemeyer

niemeyer Apr 14, 2016

Contributor

LGTM, but let's please rename these function names to be at most half that len. Let's use comments to document them instead.

@niemeyer niemeyer merged commit 1d872aa 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 decreased (-0.002%) to 76.96%
Details

@zyga zyga deleted the zyga:overlord-setup-reconnects branch Dec 12, 2016

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