MCPcopy Create free account
hub / github.com/aptly-dev/aptly / TestEncodeDecodeAppStream

Method TestEncodeDecodeAppStream

deb/snapshot_test.go:147–158  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

145}
146
147func (s *SnapshotSuite) TestEncodeDecodeAppStream(c *C) {
148 snapshot, _ := NewSnapshotFromRepository("snap-as-enc", s.repo)
149 snapshot.AppStreamFiles = map[string]string{
150 "main/dep11/Components-amd64.yml.gz": "ab/cd/Components-amd64.yml.gz",
151 "main/dep11/icons-48x48.tar.gz": "ef/gh/icons-48x48.tar.gz",
152 }
153
154 decoded := &Snapshot{}
155 c.Assert(decoded.Decode(snapshot.Encode()), IsNil)
156 c.Check(decoded.Name, Equals, snapshot.Name)
157 c.Check(decoded.AppStreamFiles, DeepEquals, snapshot.AppStreamFiles)
158}
159
160type SnapshotCollectionSuite struct {
161 PackageListMixinSuite

Callers

nothing calls this directly

Calls 4

DecodeMethod · 0.95
EncodeMethod · 0.45
CheckMethod · 0.45

Tested by

no test coverage detected