|
|
@@ -455,7 +455,7 @@ version: %s |
|
|
snapst.Active = active
|
|
|
snapst.Sequence = append(snapst.Sequence, &snapInfo.SideInfo)
|
|
|
snapst.Current = snapInfo.SideInfo.Revision
|
|
|
- snapst.Channel = "beta"
|
|
|
+ snapst.Channel = "stable"
|
|
|
|
|
|
snapstate.Set(st, name, &snapst)
|
|
|
}
|
|
|
@@ -533,6 +533,20 @@ UnitFileState=potatoes |
|
|
`),
|
|
|
}
|
|
|
|
|
|
+ var snapst snapstate.SnapState
|
|
|
+ st := s.d.overlord.State()
|
|
|
+ st.Lock()
|
|
|
+ err := snapstate.Get(st, "foo", &snapst)
|
|
|
+ st.Unlock()
|
|
|
+ c.Assert(err, check.IsNil)
|
|
|
+
|
|
|
+ // modify state
|
|
|
+ snapst.Channel = "beta"
|
|
|
+ snapst.IgnoreValidation = true
|
|
|
+ st.Lock()
|
|
|
+ snapstate.Set(st, "foo", &snapst)
|
|
|
+ st.Unlock()
|
|
|
+
|
|
|
req, err := http.NewRequest("GET", "/v2/snaps/foo", nil)
|
|
|
c.Assert(err, check.IsNil)
|
|
|
rsp, ok := getSnapInfo(snapCmd, req, nil).(*resp)
|
|
|
@@ -560,6 +574,7 @@ UnitFileState=potatoes |
|
|
Version: "v1",
|
|
|
Channel: "stable",
|
|
|
TrackingChannel: "beta",
|
|
|
+ IgnoreValidation: true,
|
|
|
Title: "title",
|
|
|
Summary: "summary",
|
|
|
Description: "description",
|
|
|
|