common

package
v0.0.0-...-3d7b588 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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

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

func GetDaprPath

func GetDaprPath() string

func GetVersionsFromEnv

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

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

func MTLSTestOnInstallUpgrade

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

func NegativeScenarioForCertRenew

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

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

func UseProvidedPrivateKeyAndRenewCerts

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

func GetInstallOnlyTest(details VersionDetails, opts TestOptions) TestCase

func GetTestForCertRenewal

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

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

func GetUninstallOnlyTest

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