Documentation ¶
Index ¶
- Constants
- 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 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, podName string, namespaceName 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 GetPodName(t *testing.T, namespaceName string, expectedName string) string
- func GetSecret(t *testing.T, namespace string, secretName string) *corev1.Secret
- func GetService(t *testing.T, namespaceName string, serviceName string) *corev1.Service
- func GetStringOccurenceInLog(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 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) (helmChartReleaseName string, namespaceName string)
- func StartDatabase(t *testing.T, namespaceName string, adminPod 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 DBVersion
- type ExtractedOptions
- type NuoDBDatabase
- type NuoDBProcess
- type Registry
Constants ¶
View Source
const ADMIN_HELM_CHART_PATH = "../../stable/admin"
View Source
const BACKUP_HELM_CHART_PATH = "../../stable/backup"
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 IMPORT_ARCHIVE_URL = "http://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"
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 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"
Variables ¶
This section is empty.
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 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 GetService ¶
func GetStringOccurenceInLog ¶
func IsOpenShiftEnvironment ¶
func IsStatefulSetHotCopyEnabled ¶
func IsStatefulSetHotCopyEnabled(ss *appsv1.StatefulSet) bool
func LabelNodes ¶
func PingService ¶
func RemoveEmptyLines ¶
func RotateTLSCertificates ¶
func StartAdmin ¶
func StartDatabase ¶
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 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 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)
Click to show internal directories.
Click to hide internal directories.