tutils

package
v0.0.0-...-310e069 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootfsImageStructMultiple = []TestDirEntry{
	{Path: "0000", IsDir: true},
	{Path: "0000/data", IsDir: true},
	{Path: "0000/data/update.ext4", Content: []byte("first update"), IsDir: false},
	{Path: "0000/type-info", Content: []byte(`{"type": "rootfs-image"}`), IsDir: false},
	{Path: "0000/meta-data", Content: []byte(`{"DeviceType": "vexpress-qemu", "ImageID": "core-image-minimal-201608110900"}`), IsDir: false},
	{Path: "0000/signatures", IsDir: true},
	{Path: "0000/signatures/update.ext4.sig", IsDir: false},
	{Path: "0000/scripts", IsDir: true},
	{Path: "0000/scripts/pre", IsDir: true},
	{Path: "0000/scripts/pre/0000_install.sh", Content: []byte("run me!"), IsDir: false},
	{Path: "0000/scripts/post", IsDir: true},
	{Path: "0000/scripts/check", IsDir: true},

	{Path: "0001", IsDir: true},
	{Path: "0001/data", IsDir: true},
	{Path: "0001/data/update_next.ext3", Content: []byte("second update"), IsDir: false},
	{Path: "0001/type-info", Content: []byte(`{"type": "rootfs-image"}`), IsDir: false},
	{Path: "0001/meta-data", Content: []byte(`{"DeviceType": "vexpress-qemu", "ImageID": "core-image-minimal-201608110900"}`), IsDir: false},
	{Path: "0001/signatures", IsDir: true},
	{Path: "0001/signatures/update_next.ext3.sig", IsDir: false},
	{Path: "0001/scripts", IsDir: true},
	{Path: "0001/scripts/pre", IsDir: true},
	{Path: "0001/scripts/pre/0000_install.sh", Content: []byte("run me!"), IsDir: false},
	{Path: "0001/scripts/post", IsDir: true},
	{Path: "0001/scripts/check", IsDir: true},
}
View Source
var RootfsImageStructOK = []TestDirEntry{
	{Path: "0000", IsDir: true},
	{Path: "0000/data", IsDir: true},
	{Path: "0000/data/update.ext4", Content: []byte("my first update"), IsDir: false},
	{Path: "0000/type-info",
		Content: []byte(`{"type": "rootfs-image"}`),
		IsDir:   false},
	{Path: "0000/meta-data",
		Content: []byte(``),
		IsDir:   false},
	{Path: "0000/signatures", IsDir: true},
	{Path: "0000/signatures/update.ext4.sig", IsDir: false},
	{Path: "0000/scripts", IsDir: true},
	{Path: "0000/scripts/pre", IsDir: true},
	{Path: "0000/scripts/pre/my_script", Content: []byte("my first script"), IsDir: false},
	{Path: "0000/scripts/post", IsDir: true},
	{Path: "0000/scripts/check", IsDir: true},
}

Functions

func MakeFakeUpdateDir

func MakeFakeUpdateDir(updateDir string, elements []TestDirEntry) error

Types

type TestDirEntry

type TestDirEntry struct {
	Path    string
	Content []byte
	IsDir   bool
}

Jump to

Keyboard shortcuts

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