summaryrefslogtreecommitdiff
diff options
authorMichael Vogt <mvo@ubuntu.com>2015-11-02 09:04:38 +0100
committerMichael Vogt <mvo@ubuntu.com>2015-11-02 09:04:38 +0100
commitf5d27b9fcd96b877ca234d36a66e014b4cf4d3d7 (patch)
tree3c8cd1a513ad121d98a1af6477b3d1ae397ac832
parent7618113de9a75ee22a902d82d0dd36a7dc5f2ad5 (diff)
-rw-r--r--snappy/security_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/snappy/security_test.go b/snappy/security_test.go
index 74678109b7..182ce3e275 100644
--- a/snappy/security_test.go
+++ b/snappy/security_test.go
@@ -471,3 +471,19 @@ func (a *SecurityTestSuite) TestSecurityGetSeccompCustomPolicy(c *C) {
c.Check(err, IsNil)
c.Check(p, Equals, `canary`)
}
+
+func (a *SecurityTestSuite) TestSecurityGetAppID(c *C) {
+ id, err := getAppID("pkg_app_1.0")
+ c.Assert(err, IsNil)
+ c.Assert(id, DeepEquals, &securityAppID{
+ AppID: "pkg_app_1.0",
+ Pkgname: "pkg",
+ Appname: "app",
+ Version: "1.0",
+ })
+}
+
+func (a *SecurityTestSuite) TestSecurityGetAppIDInvalid(c *C) {
+ _, err := getAppID("invalid")
+ c.Assert(err, Equals, errInvalidAppID)
+}