Permalink
Browse files
Use new BoolFileType instead of FileType (after merge)
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
- Loading branch information...
Showing
with
6 additions
and
3 deletions.
-
+6
−3
daemon/api_test.go
|
|
@@ -1239,7 +1239,8 @@ func (s *apiSuite) TestAddCapabilitiesGood(c *check.C) { |
|
|
cap := &caps.Capability{
|
|
|
Name: "name",
|
|
|
Label: "label",
|
|
|
- Type: caps.FileType,
|
|
|
+ Type: caps.BoolFileType,
|
|
|
+ Attrs: map[string]string{"path": "/nonexistent"},
|
|
|
}
|
|
|
text, err := json.Marshal(cap)
|
|
|
c.Assert(err, check.IsNil)
|
|
|
@@ -1263,15 +1264,17 @@ func (s *apiSuite) TestAddCapabilitiesNameClash(c *check.C) { |
|
|
cap := &caps.Capability{
|
|
|
Name: "name",
|
|
|
Label: "label",
|
|
|
- Type: caps.FileType,
|
|
|
+ Type: caps.BoolFileType,
|
|
|
+ Attrs: map[string]string{"path": "/nonexistent"},
|
|
|
}
|
|
|
err := d.capRepo.Add(cap)
|
|
|
c.Assert(err, check.IsNil)
|
|
|
// Prepare for adding a second capability with the same name
|
|
|
capClashing := &caps.Capability{
|
|
|
Name: "name",
|
|
|
Label: "second label",
|
|
|
- Type: caps.FileType,
|
|
|
+ Type: caps.BoolFileType,
|
|
|
+ Attrs: map[string]string{"path": "/nonexistent"},
|
|
|
}
|
|
|
text, err := json.Marshal(capClashing)
|
|
|
c.Assert(err, check.IsNil)
|
|
|
|
0 comments on commit
3e458f3