seedtest

package
v2.42.5-go-mod+incompa... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cleaner

type Cleaner interface {
	AddCleanup(func())
}

type SeedSnaps

type SeedSnaps struct {
	StoreSigning *assertstest.StoreStack
	Brands       *assertstest.SigningAccounts

	// DB will be populated with snap assertions if not nil
	DB *asserts.Database
	// contains filtered or unexported fields
}

SeedSnaps helps creating snaps for a seed.

func (*SeedSnaps) AssertedSnap

func (ss *SeedSnaps) AssertedSnap(snapName string) (snapFile string)

func (*SeedSnaps) AssertedSnapID

func (ss *SeedSnaps) AssertedSnapID(snapName string) string

func (*SeedSnaps) AssertedSnapInfo

func (ss *SeedSnaps) AssertedSnapInfo(snapName string) *snap.Info

func (*SeedSnaps) MakeAssertedSnap

func (ss *SeedSnaps) MakeAssertedSnap(c *C, snapYaml string, files [][]string, revision snap.Revision, developerID string) (*asserts.SnapDeclaration, *asserts.SnapRevision)

func (*SeedSnaps) SetupAssertSigning

func (ss *SeedSnaps) SetupAssertSigning(storeBrandID string, cleaner Cleaner)

SetupAssertSigning initializes StoreSigning for storeBrandID and Brands.

type TestingSeed

type TestingSeed struct {
	SeedSnaps

	SnapsDir   string
	AssertsDir string
}

TestingSeed helps setting up a populated testing seed.

func (*TestingSeed) MakeAssertedSnap

func (s *TestingSeed) MakeAssertedSnap(c *C, snapYaml string, files [][]string, revision snap.Revision, developerID string) (snapFname string, snapDecl *asserts.SnapDeclaration, snapRev *asserts.SnapRevision)

func (*TestingSeed) MakeModelAssertionChain

func (s *TestingSeed) MakeModelAssertionChain(brandID, model string, extras ...map[string]interface{}) []asserts.Assertion

func (*TestingSeed) WriteAssertions

func (s *TestingSeed) WriteAssertions(fn string, assertions ...asserts.Assertion)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL