@@ -25,6 +25,7 @@ This test suite contains tests related to backup and restore with the operator.
2525*/
2626
2727import (
28+ "encoding/json"
2829 "log"
2930
3031 fdbv1beta2 "github.com/FoundationDB/fdb-kubernetes-operator/v2/api/v1beta2"
@@ -105,6 +106,8 @@ var _ = Describe("Operator Backup", Label("e2e", "pr"), func() {
105106 When ("the default backup system is used" , func () {
106107 var useRestorableVersion bool
107108 var backupConfiguration * fixtures.FdbBackupConfiguration
109+ var currentRestorableVersion * uint64
110+ var skipRestore bool
108111
109112 JustBeforeEach (func () {
110113 log .Println ("creating backup for cluster" )
@@ -135,11 +138,12 @@ var _ = Describe("Operator Backup", Label("e2e", "pr"), func() {
135138
136139 // Delete the data and restore it again.
137140 fdbCluster .ClearRange ([]byte {prefix }, 60 )
138- var currentRestorableVersion * uint64
139141 if useRestorableVersion {
140142 currentRestorableVersion = ptr .To (restorableVersion )
141143 }
142- restore = factory .CreateRestoreForCluster (backup , currentRestorableVersion )
144+ if ! skipRestore {
145+ restore = factory .CreateRestoreForCluster (backup , currentRestorableVersion )
146+ }
143147 })
144148
145149 When ("the continuous backup mode is used" , func () {
@@ -168,6 +172,36 @@ var _ = Describe("Operator Backup", Label("e2e", "pr"), func() {
168172 backupConfiguration .EncryptionEnabled = true
169173 })
170174
175+ When ("running describe command" , func () {
176+ var describeOutput string
177+
178+ BeforeEach (func () {
179+ skipRestore = true
180+ })
181+
182+ JustBeforeEach (func () {
183+ describeOutput = backup .RunDescribeCommand ()
184+ })
185+
186+ // TODO (09harsh): Enable this test when we have the fileLevelEncryption in json parser
187+ // here: https://github.com/apple/foundationdb/blob/main/fdbclient/BackupContainer.actor.cpp#L193-L250
188+ PIt ("should have file level encryption enabled" , func () {
189+ var describeData map [string ]interface {}
190+ err := json .Unmarshal ([]byte (describeOutput ), & describeData )
191+ Expect (err ).NotTo (HaveOccurred ())
192+ fileLevelEncryption := describeData ["FileLevelEncryption" ].(bool )
193+ Expect (fileLevelEncryption ).To (BeTrue ())
194+ })
195+
196+ It (
197+ "should be able to restore the cluster successfully with a restorable version" ,
198+ func () {
199+ restore = factory .CreateRestoreForCluster (backup , currentRestorableVersion )
200+ Expect (fdbCluster .GetRange ([]byte {prefix }, 25 , 60 )).Should (Equal (keyValues ))
201+ },
202+ )
203+ })
204+
171205 It (
172206 "should restore the cluster successfully with a restorable version" ,
173207 func () {
0 commit comments