Skip to content

Commit f8e515e

Browse files
committed
Enable some scheduler tests
Updated controllers handle different namespace modes consistently.
1 parent 15dcead commit f8e515e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

testing/pgo_cli/cluster_backup_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ import (
3030
func TestClusterBackup(t *testing.T) {
3131
t.Parallel()
3232

33+
teardownSchedule := func(t *testing.T, namespace, schedule string) {
34+
pgo("delete", "schedule", "-n", namespace, "--no-prompt", "--schedule-name="+schedule).Exec(t)
35+
}
36+
3337
withNamespace(t, func(namespace func() string) {
3438
withCluster(t, namespace, func(cluster func() string) {
3539
t.Run("show backup", func(t *testing.T) {
@@ -91,11 +95,10 @@ func TestClusterBackup(t *testing.T) {
9195

9296
t.Run("create schedule", func(t *testing.T) {
9397
t.Run("creates a backup", func(t *testing.T) {
94-
t.Skip("BUG: scheduler does not handle namespaces updated after creation")
95-
9698
output, err := pgo("create", "schedule", "--selector=name="+cluster(), "-n", namespace(),
9799
"--schedule-type=pgbackrest", "--schedule=* * * * *", "--pgbackrest-backup-type=full",
98100
).Exec(t)
101+
defer teardownSchedule(t, namespace(), cluster()+"-pgbackrest-full")
99102
require.NoError(t, err)
100103
require.Contains(t, output, "created")
101104

testing/pgo_cli/cluster_policy_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func TestClusterPolicy(t *testing.T) {
9292

9393
t.Run("create schedule", func(t *testing.T) {
9494
t.Run("executes a policy", func(t *testing.T) {
95-
t.Skip("BUG: scheduler does not handle namespaces updated after creation")
95+
t.Skip("BUG: how to choose a database")
9696
const policyPath = "../testdata/policy2-setup.sql"
9797
const insertPath = "../testdata/policy2-insert.sql"
9898

0 commit comments

Comments
 (0)