Skip to content

Commit ccf449e

Browse files
committed
checking describe output
1 parent c7839cc commit ccf449e

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

e2e/test_operator_backups/operator_backup_test.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ This test suite contains tests related to backup and restore with the operator.
2525
*/
2626

2727
import (
28+
"encoding/json"
2829
"log"
2930

3031
fdbv1beta2 "github.com/FoundationDB/fdb-kubernetes-operator/v2/api/v1beta2"
@@ -177,12 +178,17 @@ var _ = Describe("Operator Backup", Label("e2e", "pr"), func() {
177178
})
178179

179180
JustBeforeEach(func() {
180-
_ = backup.RunDescribeCommand()
181+
describeCommandOutput := backup.RunDescribeCommand()
182+
183+
var describeData map[string]interface{}
184+
err := json.Unmarshal([]byte(describeCommandOutput), &describeData)
185+
Expect(err).NotTo(HaveOccurred())
186+
187+
restorable := describeData["Restorable"].(bool)
188+
Expect(restorable).To(BeTrue())
189+
181190
// TODO (09harsh): Uncomment this when we have the fileLevelEncryption in json parser
182191
// here: https://github.com/apple/foundationdb/blob/main/fdbclient/BackupContainer.actor.cpp#L193-L250
183-
//var describeData map[string]interface{}
184-
//err := json.Unmarshal([]byte(describeCommandOutput), &describeData)
185-
//Expect(err).NotTo(HaveOccurred())
186192
//fileLevelEncryption := describeData["FileLevelEncryption"].(bool)
187193
//Expect(fileLevelEncryption).To(BeTrue())
188194
})

0 commit comments

Comments
 (0)