Documentation ¶
Index ¶
- Constants
- Variables
- func AddTeardown(name string, teardownFunc func())
- func Await(t *testing.T, lmbd func() bool, timeout time.Duration)
- func AwaitAdminFullyConnected(t *testing.T, namespace string, podName string, numServers int)
- func AwaitBalancerTerminated(t *testing.T, namespace string, expectedName string)
- func AwaitDatabaseRestart(t *testing.T, namespace string, podName string, databaseName string, ...)
- func AwaitDatabaseUp(t *testing.T, namespace string, podName string, databaseName string, ...)
- func AwaitNoPods(t *testing.T, namespace string, expectedName string)
- func AwaitNrReplicasReady(t *testing.T, namespace string, expectedName string, nrReplicas int)
- func AwaitNrReplicasScheduled(t *testing.T, namespace string, expectedName string, nrReplicas int)
- func AwaitPodHasVersion(t *testing.T, namespace string, podName string, expectedVersion string, ...)
- func AwaitPodObjectRecreated(t *testing.T, namespace string, pod *corev1.Pod, timeout time.Duration)
- func AwaitPodPhase(t *testing.T, namespace string, podName string, phase corev1.PodPhase, ...)
- func AwaitPodRestartCountGreaterThan(t *testing.T, namespace string, podName string, expectedRestartCount int32, ...)
- func AwaitPodStatus(t *testing.T, namespace string, podName string, ...)
- func AwaitPodTemplateHasVersion(t *testing.T, namespace string, podNameTemplate string, expectedVersion string, ...)
- func AwaitPodUp(t *testing.T, namespace string, adminPodName string, timeout time.Duration)
- func AwaitTillerUp(t *testing.T)
- func BackupCerificateFilesOnTestFailure(t *testing.T, namespaceName string, srcDirectory string)
- func CopyCertificatesToControlHost(t *testing.T, podName string, namespaceName string) string
- func CreateNamespace(t *testing.T, namespaceName string)
- func CreateSecret(t *testing.T, namespaceName string, certName string, secretName string, ...)
- func CreateSecretWithPassword(t *testing.T, namespaceName string, certName string, secretName string, ...)
- func DeleteDatabase(t *testing.T, namespace string, dbName string, podName string)
- func DeletePod(t *testing.T, namespace string, podName string)
- func EnsureDatabaseNotRunning(t *testing.T, adminPod string, opt ExtractedOptions, ...)
- func ExecuteCommandsInPod(t *testing.T, namespaceName string, podName string, commands []string)
- func GenerateCustomCertificates(t *testing.T, podName string, namespaceName string, commands []string)
- func GenerateTLSConfiguration(t *testing.T, namespaceName string, commands []string) (string, string)
- func GetAdminEventLog(t *testing.T, namespace string, podName string)
- func GetAppLog(t *testing.T, namespace string, podName string, fileNameSuffix string, ...)
- func GetDaemonSet(t *testing.T, namespace string, daemonSetName string) *v1.DaemonSet
- func GetDiagnoseOnTestFailure(t *testing.T, namespace string, podName string)
- func GetK8sEventLog(t *testing.T, namespace string)
- func GetPod(t *testing.T, namespace string, podName string) *corev1.Pod
- func GetPodName(t *testing.T, namespaceName string, expectedName string) string
- func GetPodRestartCount(t *testing.T, namespace string, podName string) int32
- func GetReplicationController(t *testing.T, namespace string, replicationControllerName string) *corev1.ReplicationController
- func GetSecret(t *testing.T, namespace string, secretName string) *corev1.Secret
- func GetService(t *testing.T, namespaceName string, serviceName string) *corev1.Service
- func GetStringOccurrenceInLog(t *testing.T, namespace string, podName string, expectedLogLine string, ...) int
- func GetUpgradedReleaseVersion(t *testing.T, options *helm.Options, suggestedVersion string) string
- func InjectTestVersion(t *testing.T, options *helm.Options)
- func IsDaemonSetHotCopyEnabled(ss *appsv1.DaemonSet) bool
- func IsOpenShiftEnvironment(t *testing.T) bool
- func IsStatefulSetHotCopyEnabled(ss *appsv1.StatefulSet) bool
- func KillAdminPod(t *testing.T, namespace string, podName string)
- func KillProcess(t *testing.T, namespace string, podName string)
- func LabelNodes(t *testing.T, namespaceName string, labelName string, labelValue string)
- func PingService(t *testing.T, namespace string, serviceName string, podName string)
- func PrintCertificateFilesOnTestFailure(t *testing.T, srcDirectory string)
- func ReadAll(path string) ([]byte, error)
- func RecoverCoresFromTEs(t *testing.T, namespaceName string, databaseName string)
- func RemoveEmptyLines(s string) string
- func RotateTLSCertificates(t *testing.T, options *helm.Options, namespaceName string, ...)
- func RunSQL(t *testing.T, namespace string, podName string, databaseName string, ...) (result string, err error)
- func StartAdmin(t *testing.T, options *helm.Options, replicaCount int, namespace string) (string, string)
- func StartAdminFromHelmRepository(t *testing.T, options *helm.Options, fromHelmVersion string, replicaCount int, ...) (string, string)
- func StartAdminTemplate(t *testing.T, options *helm.Options, replicaCount int, namespace string, ...) (helmChartReleaseName string, namespaceName string)
- func StartDatabase(t *testing.T, namespace string, adminPod string, options *helm.Options) string
- func StartDatabaseFromHelmRepository(t *testing.T, namespace string, adminPod string, fromHelmVersion string, ...) string
- func StartDatabaseTemplate(t *testing.T, namespaceName string, adminPod string, options *helm.Options, ...) (helmChartReleaseName string)
- func StartYCSBWorkload(t *testing.T, namespaceName string, options *helm.Options) (helmChartReleaseName string)
- func Teardown(name string)
- func UnmarshalJSONObject(t *testing.T, stringJSON string) map[string]interface{}
- func VerifyAdminKvSetAndGet(t *testing.T, podName string, namespaceName string)
- func VerifyAdminState(t *testing.T, namespace string, podName string)
- func VerifyCertificateInLog(t *testing.T, namespace string, podName string, expectedLogLine string)
- func VerifyLicenseFile(t *testing.T, namespace string, podName string, expectedLicense string)
- func VerifyLicenseIsCommunity(t *testing.T, namespace string, podName string)
- func VerifyLicensingErrorsInLog(t *testing.T, namespace string, podName string, expectError bool)
- func VerifyPolicyInstalled(t *testing.T, namespace string, podName string)
- func VerifyTeardown(t *testing.T)
- type AdminInstallationStep
- type DBVersion
- type DatabaseInstallationStep
- type ExtractedOptions
- type NuoDBArchive
- type NuoDBDatabase
- type NuoDBKubeConfig
- type NuoDBProcess
- type Registry
Constants ¶
View Source
const ADMIN_HELM_CHART_PATH = "../../stable/admin"
View Source
const CA_CERT_FILE = "ca.cert"
View Source
const CA_CERT_FILE_NEW = "ca_new.cert"
View Source
const CA_CERT_SECRET = "nuodb-ca-cert"
View Source
const CERTIFICATES_BACKUP_PATH = "/tmp/keys_backup"
View Source
const CERTIFICATES_GENERATION_PATH = "/tmp/keys"
View Source
const DATABASE_HELM_CHART_PATH = "../../stable/database"
View Source
const DEBUG_POD = `` /* 475-byte string literal not displayed */
View Source
const IMPORT_ARCHIVE_URL = "https://download.nuohub.org/ce_releases/restore.bak.tz"
View Source
const INJECT_FILE = "../../versionInject.yaml"
View Source
const K8S_EVENT_LOG_FILE = "kubernetes_event.log"
View Source
const KEYSTORE_FILE = "nuoadmin.p12"
View Source
const KEYSTORE_SECRET = "nuodb-keystore"
View Source
const MINIMAL_VIABLE_ENGINE_CPU = "500m"
suffix "m" for spec.containers[].resources.requests.cpu denotes "millicores", and 1 CPU is equivalent to 1000m
View Source
const MINIMAL_VIABLE_ENGINE_MEMORY = "500Mi"
View Source
const NUOCMD_FILE = "nuocmd.pem"
View Source
const NUOCMD_SECRET = "nuodb-client-pem"
View Source
const RESTORE_HELM_CHART_PATH = "../../stable/restore"
View Source
const RESULT_DIR = "../../results"
View Source
const SECRET_PASSWORD = "changeIt"
View Source
const TEARDOWN_ADMIN = "admin"
View Source
const TEARDOWN_BACKUP = "backup"
View Source
const TEARDOWN_DATABASE = "database"
View Source
const TEARDOWN_RESTORE = "database"
View Source
const TEARDOWN_SECRETS = "secrets"
View Source
const TEARDOWN_YCSB = "ycsb"
View Source
const THP_HELM_CHART_PATH = "../../stable/transparent-hugepage"
View Source
const TLS_GENERATOR_POD_TEMPLATE = `` /* 170-byte string literal not displayed */
View Source
const TLS_SECRET_NO_PASSWORD_YAML_TEMPLATE = `---
apiVersion: v1
kind: Secret
metadata:
name: %s
namespace: %s
apiVersion: v1
data:
%s: %s
`
View Source
const TLS_SECRET_PASSWORD_YAML_TEMPLATE = `---
apiVersion: v1
kind: Secret
metadata:
name: %s
namespace: %s
apiVersion: v1
data:
%s: %s
password: %s
`
View Source
const TRUSTSTORE_FILE = "nuoadmin-truststore.p12"
View Source
const TRUSTSTORE_SECRET = "nuodb-truststore"
View Source
const YCSB_HELM_CHART_PATH = "../../incubator/demo-ycsb"
Variables ¶
View Source
var AdminRolesRequirePatching = false
Functions ¶
func AddTeardown ¶
func AddTeardown(name string, teardownFunc func())
*
- add a teardown function to the named list - for later execution
func AwaitBalancerTerminated ¶
func AwaitDatabaseRestart ¶
func AwaitDatabaseUp ¶
func AwaitNrReplicasReady ¶
func AwaitPodHasVersion ¶
func AwaitPodObjectRecreated ¶
func AwaitPodPhase ¶
func AwaitPodStatus ¶
func AwaitPodStatus(t *testing.T, namespace string, podName string, condition corev1.PodConditionType, status corev1.ConditionStatus, timeout time.Duration)
func AwaitPodUp ¶
func AwaitTillerUp ¶
func CreateNamespace ¶
func CreateSecret ¶
func DeleteDatabase ¶
func EnsureDatabaseNotRunning ¶
func EnsureDatabaseNotRunning(t *testing.T, adminPod string, opt ExtractedOptions, kubectlOptions *k8s.KubectlOptions)
func ExecuteCommandsInPod ¶
func GetDaemonSet ¶
func GetK8sEventLog ¶
func GetPodRestartCount ¶
func GetService ¶
func IsOpenShiftEnvironment ¶
func IsStatefulSetHotCopyEnabled ¶
func IsStatefulSetHotCopyEnabled(ss *appsv1.StatefulSet) bool
func LabelNodes ¶
func PingService ¶
func RecoverCoresFromTEs ¶
func RemoveEmptyLines ¶
func RotateTLSCertificates ¶
func StartAdmin ¶
func StartAdminTemplate ¶
func StartDatabase ¶
func StartDatabaseTemplate ¶
func StartYCSBWorkload ¶
func Teardown ¶
func Teardown(name string)
*
- Call the stored teardown functions in the named list, in the correct order (last-in-first-out)
func UnmarshalJSONObject ¶
func VerifyAdminKvSetAndGet ¶
func VerifyCertificateInLog ¶
func VerifyLicenseFile ¶
func VerifyPolicyInstalled ¶
func VerifyTeardown ¶
* * Verify all teardownLists have been executed already; and throw an ASSERT if not. * Can be used to verify correct codng of a test that uses teardown. * * NOTE: while the funcs are called in the correct order for each list, there can be * NO guarantee that the lists are iterated in the correct order. * * This function MUST NOT be used as a replacement for calling teardown() at the correct point in the code.
Types ¶
type AdminInstallationStep ¶
type ExtractedOptions ¶
type ExtractedOptions struct { NrTePods int NrSmHotCopyPods int NrSmNoHotCopyPods int NrSmPods int DbName string ClusterName string }
func GetExtractedOptions ¶
func GetExtractedOptions(options *helm.Options) (opt ExtractedOptions)
type NuoDBArchive ¶
type NuoDBArchive struct { Id int `json:"id"` DbName string `json:"dbName"` Path string `json:"path"` State string `json:"state"` }
func UnmarshalArchives ¶
func UnmarshalArchives(s string) (err error, archives []NuoDBArchive)
type NuoDBDatabase ¶
type NuoDBDatabase struct { Incarnation DBVersion `json:"incarnation"` Name string `json:"name"` Processes string `json:"processes"` State string `json:"state"` }
func UnmarshalDatabase ¶
func UnmarshalDatabase(s string) (err error, databases []NuoDBDatabase)
type NuoDBKubeConfig ¶
type NuoDBKubeConfig struct { Pods map[string]corev1.Pod `json:"pods"` Deployments map[string]v1.Deployment `json:"deployments"` StatefulSets map[string]v1.StatefulSet `json:"statefulsets"` Volumes map[string]corev1.Volume `json:"volumes"` DaemonSets map[string]v1.DaemonSet `json:"daemonSets"` }
func GetNuoDBK8sConfigDump ¶
func GetNuoDBK8sConfigDump(t *testing.T, namespace string, podName string) NuoDBKubeConfig
func UnmarshalNuoDBKubeConfig ¶
func UnmarshalNuoDBKubeConfig(s string) (err error, kubeConfigs []NuoDBKubeConfig)
type NuoDBProcess ¶
type NuoDBProcess struct { Address string `json:"address"` DbName string `json:"dbName"` Type string `json:"type"` Host string `json:"host"` Hostname string `json:"hostname"` Labels map[string]string `json:"labels"` }
func Unmarshal ¶
func Unmarshal(s string) (err error, processes []NuoDBProcess)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.