Documentation
¶
Index ¶
- func LoadCertificate(t *testing.T, certSecret *corev1.Secret, key string) *x509.Certificate
- func PrintDebugLogs(t *testing.T, options *k8s.KubectlOptions)
- func RequireCRDBToFunction(t *testing.T, crdbCluster CockroachCluster, rotate bool)
- func RequireCertRotateJobToBeCompleted(t *testing.T, jobName string, crdbCluster CockroachCluster, ...)
- func RequireCertificatesToBeValid(t *testing.T, crdbCluster CockroachCluster)
- func RequireClusterToBeReadyEventuallyTimeout(t *testing.T, crdbCluster CockroachCluster, timeout time.Duration)
- func RequireDatabaseToFunction(t *testing.T, crdbCluster CockroachCluster, dbName string)
- func RequireToRunRotateJob(t *testing.T, crdbCluster CockroachCluster, values map[string]string, ...)
- type CockroachCluster
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadCertificate ¶
func PrintDebugLogs ¶
func PrintDebugLogs(t *testing.T, options *k8s.KubectlOptions)
PrintDebugLogs adds the verbose logging of the cluster at the runtime.
func RequireCRDBToFunction ¶
func RequireCRDBToFunction(t *testing.T, crdbCluster CockroachCluster, rotate bool)
RequireCRDBToFunction creates a database, a table and insert two rows if it is a fresh install of the cluster. If certificate is rotated and cluster rolling restart has happened, this will check that existing two rows are present.
func RequireCertRotateJobToBeCompleted ¶
func RequireCertRotateJobToBeCompleted(t *testing.T, jobName string, crdbCluster CockroachCluster, timeout time.Duration)
RequireCertRotateJobToBeCompleted waits for the certificate rotation job to complete.
func RequireCertificatesToBeValid ¶
func RequireCertificatesToBeValid(t *testing.T, crdbCluster CockroachCluster)
RequireCertificatesToBeValid will check the CA certificate and client certificate validity from their respective secrets. Also, it verifies that node certificates are signed by the CA certificates used in the cluster.
func RequireClusterToBeReadyEventuallyTimeout ¶
func RequireClusterToBeReadyEventuallyTimeout(t *testing.T, crdbCluster CockroachCluster, timeout time.Duration)
RequireClusterToBeReadyEventuallyTimeout waits for all the CRDB pods to come into running state.
func RequireDatabaseToFunction ¶
func RequireDatabaseToFunction(t *testing.T, crdbCluster CockroachCluster, dbName string)
RequireDatabaseToFunction creates a table and insert two rows.
func RequireToRunRotateJob ¶
func RequireToRunRotateJob(t *testing.T, crdbCluster CockroachCluster, values map[string]string, scheduleToTriggerRotation string, caRotate bool)
RequireToRunRotateJob triggers the client/node or CA certificate rotation job based on next cron schedule.