testutil

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package testutil provides utility functions to access store values in unit tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetActivations

func GetActivations(t *testing.T, txHandle transactionHandle, name string) uint

GetActivations returns the number of activations for a given Marble.

func GetCertificate

func GetCertificate(t *testing.T, txHandle transactionHandle, name string) *x509.Certificate

GetCertificate returns the certificate with the given name.

func GetInfrastructure

func GetInfrastructure(t *testing.T, txHandle transactionHandle, name string) quote.InfrastructureProperties

GetInfrastructure returns infrastructure information.

func GetManifest

func GetManifest(t *testing.T, txHandle transactionHandle) manifest.Manifest

GetManifest returns the manifest.

func GetManifestSignature

func GetManifestSignature(t *testing.T, txHandle transactionHandle) []byte

GetManifestSignature returns the manifest signature.

func GetMarble

func GetMarble(t *testing.T, txHandle transactionHandle, name string) manifest.Marble

GetMarble returns the marble with the given name.

func GetPackage

func GetPackage(t *testing.T, txHandle transactionHandle, name string) quote.PackageProperties

GetPackage returns the package with the given name.

func GetPrivateKey

func GetPrivateKey(t *testing.T, txHandle transactionHandle, name string) *ecdsa.PrivateKey

GetPrivateKey returns the private key with the given name.

func GetRawManifest

func GetRawManifest(t *testing.T, txHandle transactionHandle) []byte

GetRawManifest returns the raw manifest.

func GetSecret

func GetSecret(t *testing.T, txHandle transactionHandle, name string) manifest.Secret

GetSecret returns the secret with the given name.

func GetSecretMap

func GetSecretMap(t *testing.T, txHandle transactionHandle) map[string]manifest.Secret

GetSecretMap returns a map of all secrets in the store.

func GetState

func GetState(t *testing.T, txHandle transactionHandle) state.State

GetState returns the current state of the store.

func GetTLS

func GetTLS(t *testing.T, txHandle transactionHandle, name string) manifest.TLStag

GetTLS returns the TLS config with the given name.

func GetUpdateLog

func GetUpdateLog(t *testing.T, txHandle transactionHandle) string

GetUpdateLog returns the update log.

func GetUser

func GetUser(t *testing.T, txHandle transactionHandle, name string) *user.User

GetUser returns the user with the given name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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