Skip to content

Commit

Permalink
many: changes to testing in preparation of Core 20 seed consuming code
Browse files Browse the repository at this point in the history
Changes to the seedtest API, and renaming of the first boot suite to firstBoot16Suite with an extracted firstBootBaseTest. A follow up will introduce a separate firstBoot20Suite.
  • Loading branch information
pedronis authored Oct 30, 2019
2 parents a38b10f + ac2de30 commit 8f3b353
Show file tree
Hide file tree
Showing 7 changed files with 267 additions and 271 deletions.
7 changes: 5 additions & 2 deletions image/image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,11 @@ func (s *imageSuite) SetUpTest(c *C) {
s.tsto = image.MockToolingStore(s)

s.SeedSnaps = &seedtest.SeedSnaps{}
s.SetupAssertSigning("canonical", s)
s.SetupAssertSigning("canonical")
s.Brands.Register("my-brand", brandPrivKey, map[string]interface{}{
"verification": "verified",
})
assertstest.AddMany(s.StoreSigning, s.Brands.AccountsAndKeys("my-brand")...)
s.DB = s.StoreSigning.Database

s.model = s.Brands.Model("my-brand", "my-model", map[string]interface{}{
"display-name": "my display name",
Expand Down Expand Up @@ -450,6 +449,10 @@ func (s *imageSuite) TestHappyDecodeModelAssertion(c *C) {
c.Check(a.Type(), Equals, asserts.ModelType)
}

func (s *imageSuite) MakeAssertedSnap(c *C, snapYaml string, files [][]string, revision snap.Revision, developerID string) {
s.SeedSnaps.MakeAssertedSnap(c, snapYaml, files, revision, developerID, s.StoreSigning.Database)
}

const stableChannel = "stable"

const pcGadgetYaml = `
Expand Down
Loading

0 comments on commit 8f3b353

Please sign in to comment.