common

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CRDTest

func CRDTest(details VersionDetails, opts TestOptions) func(t *testing.T)

func CheckMTLSStatus added in v1.7.0

func CheckMTLSStatus(details VersionDetails, opts TestOptions, shouldWarningExist bool) func(t *testing.T)

func ClusterRoleBindingsTest

func ClusterRoleBindingsTest(details VersionDetails, opts TestOptions) func(t *testing.T)

func ClusterRolesTest

func ClusterRolesTest(details VersionDetails, opts TestOptions) func(t *testing.T)

func ComponentsTestOnInstallUpgrade

func ComponentsTestOnInstallUpgrade(opts TestOptions) func(t *testing.T)

func DeleteCRD

func DeleteCRD(crds []string) func(*testing.T)

func EnsureUninstall

func EnsureUninstall(all bool, devEnabled bool) (string, error)

func GenerateNewCertAndRenew added in v1.7.0

func GenerateNewCertAndRenew(details VersionDetails, opts TestOptions) func(t *testing.T)

func GetDaprPath added in v1.9.0

func GetDaprPath() string

func GetVersionsFromEnv added in v1.7.0

func GetVersionsFromEnv(t *testing.T, latest bool) (string, string)

GetVersionsFromEnv will return values from required environment variables. parameter `latest` is used to determine if the latest versions of dapr & dashboard should be used. if environment variables are not set it fails the test.

func HTTPEndpointsTestOnInstallUpgrade added in v1.12.0

func HTTPEndpointsTestOnInstallUpgrade(opts TestOptions) func(t *testing.T)

func MTLSTestOnInstallUpgrade

func MTLSTestOnInstallUpgrade(opts TestOptions) func(t *testing.T)

func NegativeScenarioForCertRenew added in v1.7.0

func NegativeScenarioForCertRenew() func(t *testing.T)

func StatusTestOnInstallUpgrade

func StatusTestOnInstallUpgrade(details VersionDetails, opts TestOptions) func(t *testing.T)

func UpgradeTest

func UpgradeTest(details VersionDetails, opts TestOptions) func(t *testing.T)

func UseProvidedNewCertAndRenew added in v1.7.0

func UseProvidedNewCertAndRenew(details VersionDetails, opts TestOptions) func(t *testing.T)

func UseProvidedPrivateKeyAndRenewCerts added in v1.7.0

func UseProvidedPrivateKeyAndRenewCerts(details VersionDetails, opts TestOptions) func(t *testing.T)

Types

type Resource

type Resource int
const (
	DaprTestNamespace           = "dapr-cli-tests"
	CustomResourceDefs Resource = iota
	ClusterRoles
	ClusterRoleBindings
)

type TestCase

type TestCase struct {
	Name     string
	Callable func(*testing.T)
}

func GetInstallOnlyTest added in v1.12.0

func GetInstallOnlyTest(details VersionDetails, opts TestOptions) TestCase

func GetTestForCertRenewal added in v1.10.0

func GetTestForCertRenewal(currentVersionDetails VersionDetails, installOpts TestOptions) []TestCase

func GetTestsOnInstall

func GetTestsOnInstall(details VersionDetails, opts TestOptions) []TestCase

func GetTestsOnUninstall

func GetTestsOnUninstall(details VersionDetails, opts TestOptions) []TestCase

func GetTestsPostCertificateRenewal added in v1.7.0

func GetTestsPostCertificateRenewal(details VersionDetails, opts TestOptions) []TestCase

func GetUninstallOnlyTest added in v1.12.0

func GetUninstallOnlyTest(details VersionDetails, opts TestOptions) TestCase

type TestOptions

type TestOptions struct {
	DevEnabled               bool
	HAEnabled                bool
	MTLSEnabled              bool
	ApplyComponentChanges    bool
	ApplyHTTPEndpointChanges bool
	CheckResourceExists      map[Resource]bool
	UninstallAll             bool
	InitWithCustomCert       bool
}

type VersionDetails

type VersionDetails struct {
	RuntimeVersion       string
	DashboardVersion     string
	ImageVariant         string
	CustomResourceDefs   []string
	ClusterRoles         []string
	ClusterRoleBindings  []string
	UseDaprLatestVersion bool
}

Jump to

Keyboard shortcuts

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