tests

package
v1.11.4 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = int64(1234)

	NamespaceID       = "deadbeef-0123-4567-890a-bcdef0123456"
	Namespace         = "some random namespace name"
	ParentNamespaceID = "deadbeef-0123-4567-890a-bcdef0123457"
	ParentNamespace   = "some random parent namespace name"
	TargetNamespaceID = "deadbeef-0123-4567-890a-bcdef0123458"
	TargetNamespace   = "some random target namespace name"
	ChildNamespaceID  = "deadbeef-0123-4567-890a-bcdef0123459"
	ChildNamespace    = "some random child namespace name"
	WorkflowID        = "random-workflow-id"
	RunID             = "0d00698f-08e1-4d36-a3e2-3bf109f5d2d6"

	LocalNamespaceEntry = cache.NewLocalNamespaceCacheEntryForTest(
		&persistencespb.NamespaceInfo{Id: NamespaceID, Name: Namespace},
		&persistencespb.NamespaceConfig{Retention: timestamp.DurationFromDays(1)},
		cluster.TestCurrentClusterName,
		nil,
	)

	GlobalNamespaceEntry = cache.NewGlobalNamespaceCacheEntryForTest(
		&persistencespb.NamespaceInfo{Id: NamespaceID, Name: Namespace},
		&persistencespb.NamespaceConfig{
			Retention:               timestamp.DurationFromDays(1),
			VisibilityArchivalState: enumspb.ARCHIVAL_STATE_ENABLED,
			VisibilityArchivalUri:   "test:///visibility/archival",
		},
		&persistencespb.NamespaceReplicationConfig{
			ActiveClusterName: cluster.TestCurrentClusterName,
			Clusters: []string{
				cluster.TestCurrentClusterName,
				cluster.TestAlternativeClusterName,
			},
		},
		Version,
		nil,
	)

	GlobalParentNamespaceEntry = cache.NewGlobalNamespaceCacheEntryForTest(
		&persistencespb.NamespaceInfo{Id: ParentNamespaceID, Name: ParentNamespace},
		&persistencespb.NamespaceConfig{Retention: timestamp.DurationFromDays(1)},
		&persistencespb.NamespaceReplicationConfig{
			ActiveClusterName: cluster.TestCurrentClusterName,
			Clusters: []string{
				cluster.TestCurrentClusterName,
				cluster.TestAlternativeClusterName,
			},
		},
		Version,
		nil,
	)

	GlobalTargetNamespaceEntry = cache.NewGlobalNamespaceCacheEntryForTest(
		&persistencespb.NamespaceInfo{Id: TargetNamespaceID, Name: TargetNamespace},
		&persistencespb.NamespaceConfig{Retention: timestamp.DurationFromDays(1)},
		&persistencespb.NamespaceReplicationConfig{
			ActiveClusterName: cluster.TestCurrentClusterName,
			Clusters: []string{
				cluster.TestCurrentClusterName,
				cluster.TestAlternativeClusterName,
			},
		},
		Version,
		nil,
	)

	GlobalChildNamespaceEntry = cache.NewGlobalNamespaceCacheEntryForTest(
		&persistencespb.NamespaceInfo{Id: ChildNamespaceID, Name: ChildNamespace},
		&persistencespb.NamespaceConfig{Retention: timestamp.DurationFromDays(1)},
		&persistencespb.NamespaceReplicationConfig{
			ActiveClusterName: cluster.TestCurrentClusterName,
			Clusters: []string{
				cluster.TestCurrentClusterName,
				cluster.TestAlternativeClusterName,
			},
		},
		Version,
		nil,
	)
)

Functions

func NewDynamicConfig

func NewDynamicConfig() *configs.Config

Types

This section is empty.

Jump to

Keyboard shortcuts

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