test

package
v2.24.2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RuntimeConfig struct {
		NumOwners int

		NumConfigurations int
		NumConditions     int
		// contains filtered or unexported fields
	}
)

Functions

func AddAppliedConfigurationsToStore

func AddAppliedConfigurationsToStore(ctx context.Context, t *testing.T, s store.Store) map[string]*store.AppliedConfiguration

func AddConditions

func AddConditions(ctx context.Context, t *testing.T, ownerClaim string, ssc pb.SnippetServiceClient, n int, calcVersion calculateInitialVersionNumber) map[string]store.Condition

func AddConditionsToStore

func AddConditionsToStore(ctx context.Context, t *testing.T, s store.Store, n int, calcVersion calculateInitialVersionNumber) map[string]store.Condition

func AddConfigurations

func AddConfigurations(ctx context.Context, t *testing.T, ownerClaim string, ssc pb.SnippetServiceClient, n int, calcVersion calculateInitialVersionNumber) map[string]store.Configuration

func AddConfigurationsToStore

func AddConfigurationsToStore(ctx context.Context, t *testing.T, s store.Store, n int, calcVersion calculateInitialVersionNumber) map[string]store.Configuration

func AppliedConfigurationID

func AppliedConfigurationID(i int) string

func AppliedConfigurationResource

func AppliedConfigurationResource(t *testing.T, deviceID string, start, n int) []*pb.AppliedConfiguration_Resource

func CmpAppliedDeviceConfiguration

func CmpAppliedDeviceConfiguration(t *testing.T, want, got *pb.AppliedConfiguration, ignoreTimestamp bool)

func CmpAppliedDeviceConfigurationsMaps

func CmpAppliedDeviceConfigurationsMaps(t *testing.T, want, got map[string]*pb.AppliedConfiguration, ignoreTimestamp bool)

func CmpCondition

func CmpCondition(t *testing.T, want, got *pb.Condition, ignoreTimestamp bool)

func CmpConfiguration

func CmpConfiguration(t *testing.T, want, got *pb.Configuration, ignoreTimestamp bool)

func CmpJSON

func CmpJSON(t *testing.T, want, got interface{})

func CmpStoredCondition

func CmpStoredCondition(t *testing.T, want, got *store.Condition, ignoreTimestamp, ignoreLatest bool)

func CmpStoredConditionMaps

func CmpStoredConditionMaps(t *testing.T, want, got map[string]store.Condition)

func CmpStoredConfiguration

func CmpStoredConfiguration(t *testing.T, want, got *store.Configuration, ignoreTimestamp, ignoreLatest bool)

func CmpStoredConfigurationMaps

func CmpStoredConfigurationMaps(t *testing.T, want, got map[string]store.Configuration)

func ConditionApiAccessToken

func ConditionApiAccessToken(i int) string

func ConditionContains

func ConditionContains(t *testing.T, storeCond store.Condition, cond *pb.Condition)

func ConditionDeviceIdFilter

func ConditionDeviceIdFilter(start, n int) []string

func ConditionID

func ConditionID(i int) string

func ConditionJqExpressionFilter

func ConditionJqExpressionFilter(i int) string

func ConditionName

func ConditionName(i int) string

func ConditionResourceHrefFilter

func ConditionResourceHrefFilter(start, n int) []string

func ConditionResourceTypeFilter

func ConditionResourceTypeFilter(start, n int) []string

func ConfigurationContains

func ConfigurationContains(t *testing.T, storeConf store.Configuration, conf *pb.Configuration)

func ConfigurationID

func ConfigurationID(i int) string

func ConfigurationName

func ConfigurationName(i int) string

func ConfigurationResources

func ConfigurationResources(t *testing.T, start, n int) []*pb.Configuration_Resource

func DeviceID

func DeviceID(i int) string

func GetTokenWithOwnerClaim

func GetTokenWithOwnerClaim(t *testing.T, owner, ownerClaim string) string

func HTTPURI

func HTTPURI(uri string) string

func MakeAPIsConfig

func MakeAPIsConfig() service.APIsConfig

func MakeClientsConfig

func MakeClientsConfig() service.ClientsConfig

func MakeConfig

func MakeConfig(t require.TestingT) service.Config

func MakeHTTPConfig

func MakeHTTPConfig() service.HTTPConfig

func MakeResourceAggregateConfig added in v2.21.3

func MakeResourceAggregateConfig() service.ResourceAggregateConfig

func MakeStoreConfig

func MakeStoreConfig() storeConfig.Config

func MergeConditions

func MergeConditions(c1, c2 *store.Condition) error

func MergeConfigurations

func MergeConfigurations(c1, c2 *store.Configuration) error

func New

func New(t require.TestingT, cfg service.Config) (*service.Service, func())

func NewMongoStore

func NewMongoStore(t require.TestingT) (*storeMongo.Store, func())

func NewStore

func NewStore(t require.TestingT) (store.Store, func())

func Owner

func Owner(i int) string

func SetAppliedConfigurationExecutedBy

func SetAppliedConfigurationExecutedBy(ac *pb.AppliedConfiguration, i int)

func SetUp

func SetUp(t require.TestingT) (*service.Service, func())

func WaitForAppliedConfigurations

wait for applied configurations to get into DONE or TIMEOUT state

Types

This section is empty.

Jump to

Keyboard shortcuts

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