@@ -199,9 +199,6 @@ describe('Model Armor tests', () => {
199199 // Create empty template for sanitizeUserPrompt tests
200200 emptyTemplateId = `${ templateIdPrefix } -empty` ;
201201 await createTemplate ( emptyTemplateId , { } ) ;
202- templatesToDelete . push (
203- `projects/${ projectId } /locations/${ locationId } /templates/${ emptyTemplateId } `
204- ) ;
205202
206203 // Create basic template with PI/Jailbreak and Malicious URI filters for sanitizeUserPrompt tests
207204 basicTemplateId = `${ templateIdPrefix } -basic` ;
@@ -229,9 +226,6 @@ describe('Model Armor tests', () => {
229226 } ,
230227 } ,
231228 } ) ;
232- templatesToDelete . push (
233- `projects/${ projectId } /locations/${ locationId } /templates/${ basicSdpTemplateId } `
234- ) ;
235229
236230 // Create advanced SDP template with DLP templates
237231 const dlpTemplates = await createDlpTemplates ( ) ;
@@ -244,9 +238,6 @@ describe('Model Armor tests', () => {
244238 } ,
245239 } ,
246240 } ) ;
247- templatesToDelete . push (
248- `projects/${ projectId } /locations/${ locationId } /templates/${ advanceSdpTemplateId } `
249- ) ;
250241
251242 // Create all-filter template
252243 allFilterTemplateId = `${ templateIdPrefix } -all-filters` ;
@@ -280,45 +271,6 @@ describe('Model Armor tests', () => {
280271 } ,
281272 } ) ;
282273
283- // Create a basic SDP template for testing
284- basicSdpTemplateId = `${ templateIdPrefix } -basic-sdp` ;
285- await createTemplate ( basicSdpTemplateId , {
286- filterConfig : {
287- raiSettings : {
288- raiFilters : [
289- {
290- filterType : RaiFilterType . DANGEROUS ,
291- confidenceLevel : DetectionConfidenceLevel . HIGH ,
292- } ,
293- {
294- filterType : RaiFilterType . HARASSMENT ,
295- confidenceLevel : DetectionConfidenceLevel . MEDIUM_AND_ABOVE ,
296- } ,
297- {
298- filterType : RaiFilterType . HATE_SPEECH ,
299- confidenceLevel : DetectionConfidenceLevel . HIGH ,
300- } ,
301- {
302- filterType : RaiFilterType . SEXUALLY_EXPLICIT ,
303- confidenceLevel : DetectionConfidenceLevel . HIGH ,
304- } ,
305- ] ,
306- } ,
307- sdpSettings : {
308- basicConfig : {
309- filterEnforcement : SdpBasicConfigEnforcement . ENABLED ,
310- } ,
311- } ,
312- } ,
313- } ) ;
314-
315- templatesToDelete . push (
316- `projects/${ projectId } /locations/${ locationId } /templates/${ emptyTemplateId } ` ,
317- `projects/${ projectId } /locations/${ locationId } /templates/${ basicTemplateId } ` ,
318- `projects/${ projectId } /locations/${ locationId } /templates/${ basicSdpTemplateId } ` ,
319- `projects/${ projectId } /locations/${ locationId } /templates/${ allFilterTemplateId } `
320- ) ;
321-
322274 // Create a template to be deleted
323275 templateToDeleteId = `${ templateIdPrefix } -to-delete` ;
324276 await createTemplate ( templateToDeleteId , {
@@ -327,7 +279,13 @@ describe('Model Armor tests', () => {
327279 confidenceLevel : DetectionConfidenceLevel . MEDIUM_AND_ABOVE ,
328280 } ,
329281 } ) ;
282+
330283 templatesToDelete . push (
284+ `projects/${ projectId } /locations/${ locationId } /templates/${ emptyTemplateId } ` ,
285+ `projects/${ projectId } /locations/${ locationId } /templates/${ basicTemplateId } ` ,
286+ `projects/${ projectId } /locations/${ locationId } /templates/${ basicSdpTemplateId } ` ,
287+ `projects/${ projectId } /locations/${ locationId } /templates/${ allFilterTemplateId } ` ,
288+ `projects/${ projectId } /locations/${ locationId } /templates/${ advanceSdpTemplateId } ` ,
331289 `projects/${ projectId } /locations/${ locationId } /templates/${ templateToDeleteId } `
332290 ) ;
333291 } ) ;
0 commit comments