diff --git a/tests/lib/fakestore/store/store.go b/tests/lib/fakestore/store/store.go index aca91854ebd2..0914a9535f05 100644 --- a/tests/lib/fakestore/store/store.go +++ b/tests/lib/fakestore/store/store.go @@ -171,6 +171,7 @@ type essentialInfo struct { Version string Size uint64 Digest string + Confinement string } var errInfo = errors.New("cannot get info") @@ -226,6 +227,7 @@ func snapEssentialInfo(w http.ResponseWriter, fn, snapID string, bs asserts.Back Version: info.Version, Digest: snapDigest, Size: size, + Confinement: string(info.Confinement), }, nil } @@ -244,6 +246,7 @@ type detailsReplyJSON struct { Version string `json:"version"` Revision int `json:"revision"` DownloadDigest string `json:"download_sha3_384"` + Confinement string `json:"confinement"` } func (s *Store) searchEndpoint(w http.ResponseWriter, req *http.Request) { @@ -293,6 +296,7 @@ func (s *Store) detailsEndpoint(w http.ResponseWriter, req *http.Request) { Version: essInfo.Version, Revision: essInfo.Revision, DownloadDigest: hexify(essInfo.Digest), + Confinement: essInfo.Confinement, } // use indent because this is a development tool, output @@ -429,6 +433,7 @@ func (s *Store) bulkEndpoint(w http.ResponseWriter, req *http.Request) { Version: essInfo.Version, Revision: essInfo.Revision, DownloadDigest: hexify(essInfo.Digest), + Confinement: essInfo.Confinement, }) } } @@ -523,8 +528,9 @@ type detailsResultV2 struct { Sha3_384 string `json:"sha3-384"` Size uint64 `json:"size"` } `json:"download"` - Version string `json:"version"` - Revision int `json:"revision"` + Version string `json:"version"` + Revision int `json:"revision"` + Confinement string `json:"confinement"` } func (s *Store) snapActionEndpoint(w http.ResponseWriter, req *http.Request) { @@ -606,6 +612,7 @@ func (s *Store) snapActionEndpoint(w http.ResponseWriter, req *http.Request) { Name: essInfo.Name, Version: essInfo.Version, Revision: essInfo.Revision, + Confinement: essInfo.Confinement, }, } res.Snap.Publisher.ID = essInfo.DeveloperID