common

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DaprTestNamespace           = "dapr-cli-tests"
	CustomResourceDefs Resource = iota
	ClusterRoles
	ClusterRoleBindings

	DaprModeHA    = "ha"
	DaprModeNonHA = "non-ha"
)

Variables

View Source
var (
	VersionWithScheduler   = semver.MustParse("1.14.0-rc.1")
	VersionWithHAScheduler = semver.MustParse("1.15.0-rc.1")
)

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 GetDaprTestHaMode added in v1.15.1

func GetDaprTestHaMode() string

func GetRuntimeVersion added in v1.15.0

func GetRuntimeVersion(t *testing.T, latest bool) *semver.Version

func GetVersionsFromEnv added in v1.7.0

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

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

func HTTPEndpointsTestOnInstallUpgrade added in v1.12.0

func HTTPEndpointsTestOnInstallUpgrade(installOpts TestOptions, upgradeOpts 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 ShouldSkipTest added in v1.15.1

func ShouldSkipTest(mode string) bool

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

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
	TimeoutSeconds           int
}

type VersionDetails

type VersionDetails struct {
	RuntimeVersion       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