tests

package
v0.0.0-...-5969d1b Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Copyright 2023 Northern.tech AS

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Index

Constants

View Source
const (
	SuccessfulInstall
	SuccessfulRollback
	SuccessfulUncommitted
	UnsuccessfulInstall
)

Variables

This section is empty.

Functions

func CreateTestArtifactV2

func CreateTestArtifactV2(data, compressAlgorithm, artifactName string,
	compatDevices []string) (*artifactReadCloser, error)

Creates a test rootfs artifact (version 2) with rootfs-content @data, and the provided depends and provides.

func CreateTestArtifactV3

func CreateTestArtifactV3(data, compressAlgorithm string,
	artifactProvides *ArtifactProvides, artifactDepends *ArtifactDepends,
	typeProvides map[string]string,
	typeDepends map[string]interface{}) (*artifactReadCloser, error)

Creates a test rootfs artifact (version 3) with rootfs content @data, and the provided depends and provides.

func CreateTestBootstrapArtifact

func CreateTestBootstrapArtifact(
	t *testing.T,
	path, device_type, artifactName string,
	artifactProvides artifact.TypeInfoProvides,
	clearsArtifactProvides []string,
)

func CreateTestBootstrapArtifactDefault

func CreateTestBootstrapArtifactDefault(t *testing.T, path string)

func UpdateModulesSetup

func UpdateModulesSetup(t *testing.T, attr *TestModuleAttr, tmpdir string,
	artOverrides ArtifactAttributeOverrides)

Types

type ArtifactAttributeOverrides

type ArtifactAttributeOverrides struct {
	Provides   *artifact.ArtifactProvides
	Depends    *artifact.ArtifactDepends
	TypeInfoV3 *artifact.TypeInfoV3
	Updates    *awriter.Updates
}

type ArtifactDepends

type ArtifactDepends artifact.ArtifactDepends

type ArtifactProvides

type ArtifactProvides artifact.ArtifactProvides

type InstallOutcome

type InstallOutcome int

type TestModuleAttr

type TestModuleAttr struct {
	ErrorStates        []string
	ErrorForever       bool
	SpontRebootStates  []string
	SpontRebootForever bool
	HangStates         []string
	RollbackDisabled   bool
	RebootDisabled     bool
}

Jump to

Keyboard shortcuts

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