Skip to content

Commit d9f38da

Browse files
Enable continuous backup for AllVersionsAndDeletes change feed tests
Add enableContinuousBackup parameter to test-resources.bicep to configure continuous backup policy when needed. Add a new account configuration in live-platform-matrix.json for AllVersionsAndDeletes change feed tests that enables continuous backup. This fixes the live tests for PR #4706 that require continuous backup to be enabled for the AllVersionsAndDeletes change feed mode to function properly. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f2f63ad0-37fe-4d65-a2a3-0329ae6cb793
1 parent 52677ff commit d9f38da

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

sdk/cosmos/live-platform-matrix.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
},
5353
"Session MultiRegion GatewayV2": {
5454
"ArmTemplateParameters": "@{ defaultConsistencyLevel = 'Session'; enableMultipleRegions = $true; testCategory = 'gateway_v2_multi_region' }"
55+
},
56+
"Session SingleRegion ChangeFeed AllVersionsAndDeletes": {
57+
"ArmTemplateParameters": "@{ defaultConsistencyLevel = 'Session'; enableContinuousBackup = $true; testCategory = 'all_versions_and_deletes' }"
5558
}
5659
}
5760
}

sdk/cosmos/test-resources.bicep

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ param enableMultipleWriteLocations bool = false
99
@description('Dictates which tests run for this resource')
1010
param testCategory string = 'emulator'
1111

12+
@description('Flag to enable continuous backup mode')
13+
param enableContinuousBackup bool = false
14+
1215
@description('Default Cosmosdb Account level consistency')
1316
param defaultConsistencyLevel string = 'Session'
1417

@@ -74,6 +77,19 @@ resource cosmosAccount 'Microsoft.DocumentDB/databaseAccounts@2023-04-15' = {
7477
{name: 'EnableNoSQLVectorSearch'}, {name: 'EnableNoSQLFullTextSearch'}
7578
]
7679
locations: locationsConfiguration
80+
backupPolicy: (enableContinuousBackup ? {
81+
type: 'Continuous'
82+
continuousTierPolicy: {
83+
state: 'On'
84+
}
85+
} : {
86+
type: 'Periodic'
87+
periodicModeProperties: {
88+
backupIntervalInMinutes: 240
89+
backupRetentionIntervalInHours: 8
90+
backupStorageRedundancy: 'Geo'
91+
}
92+
})
7793
}
7894
}
7995

0 commit comments

Comments
 (0)