@@ -30,6 +30,10 @@ import (
3030func 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
0 commit comments