Skip to content

Commit c47d696

Browse files
Milla Samuelmillasml
authored andcommitted
Fix test
1 parent 24b4172 commit c47d696

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

api/v1beta2/foundationdbbackup_types.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -298,12 +298,6 @@ func (backup *FoundationDBBackup) CheckReconciliation() (bool, error) {
298298
reconciled = false
299299
}
300300

301-
desiredBackupURL := backup.BackupURL()
302-
if backup.Status.BackupDetails.URL != desiredBackupURL {
303-
backup.Status.Generations.NeedsBackupReconfiguration = backup.Generation
304-
reconciled = false
305-
}
306-
307301
isRunning := backup.Status.BackupDetails != nil && backup.Status.BackupDetails.Running
308302
isPaused := backup.Status.BackupDetails != nil && backup.Status.BackupDetails.Paused
309303

@@ -328,6 +322,11 @@ func (backup *FoundationDBBackup) CheckReconciliation() (bool, error) {
328322
reconciled = false
329323
}
330324

325+
if isRunning && backup.BackupURL() != backup.Status.BackupDetails.URL {
326+
backup.Status.Generations.NeedsBackupReconfiguration = backup.Generation
327+
reconciled = false
328+
}
329+
331330
if reconciled {
332331
backup.Status.Generations = BackupGenerationStatus{
333332
Reconciled: backup.Generation,

api/v1beta2/foundationdbbackup_types_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ var _ = Describe("[api] FoundationDBBackup", func() {
5252
},
5353
Spec: FoundationDBBackupSpec{
5454
AgentCount: &agentCount,
55+
BlobStoreConfiguration: &BlobStoreConfiguration{
56+
AccountName: "test@test-service",
57+
},
5558
},
5659
Status: FoundationDBBackupStatus{
5760
Generations: BackupGenerationStatus{
@@ -60,7 +63,7 @@ var _ = Describe("[api] FoundationDBBackup", func() {
6063
AgentCount: 3,
6164
DeploymentConfigured: true,
6265
BackupDetails: &FoundationDBBackupStatusBackupDetails{
63-
URL: "blobstore://test@test-service/sample-cluster?bucket=fdb-backups",
66+
URL: "blobstore://test@test-service:443/sample-cluster?bucket=fdb-backups",
6467
Running: true,
6568
SnapshotPeriodSeconds: 864000,
6669
},
@@ -69,7 +72,6 @@ var _ = Describe("[api] FoundationDBBackup", func() {
6972
}
7073

7174
backup = createBackup()
72-
7375
result, err := backup.CheckReconciliation()
7476
Expect(result).To(BeTrue())
7577
Expect(err).NotTo(HaveOccurred())

kubectl-fdb/cmd/version_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1717
* See the License for the specific language governing permissions and
1818
* limitations under the License.
19-
*/package cmd
19+
*/
20+
package cmd
2021

2122
import (
2223
"bytes"

0 commit comments

Comments
 (0)