From 147ae838448613d427579304c99741534ebce336 Mon Sep 17 00:00:00 2001 From: Mihir Vala Date: Thu, 3 Jul 2025 14:41:03 +0530 Subject: [PATCH 1/3] chore(tests): enabled floor settings tests --- model-armor/test/modelarmor.test.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/model-armor/test/modelarmor.test.js b/model-armor/test/modelarmor.test.js index 1a176dab4f..d1c1ead614 100644 --- a/model-armor/test/modelarmor.test.js +++ b/model-armor/test/modelarmor.test.js @@ -940,9 +940,7 @@ describe('Model Armor tests', () => { // =================== Floor Settings Tests =================== - // TODO(b/424365799): Enable below tests once the mentioned issue is resolved - - it.skip('should get organization floor settings', async () => { + it('should get organization floor settings', async () => { const getOrganizationFloorSettings = require('../snippets/getOrganizationFloorSettings'); const output = await getOrganizationFloorSettings.main(organizationId); @@ -951,7 +949,7 @@ describe('Model Armor tests', () => { assert.equal(output.name, expectedName); }); - it.skip('should get folder floor settings', async () => { + it('should get folder floor settings', async () => { const getFolderFloorSettings = require('../snippets/getFolderFloorSettings'); const output = await getFolderFloorSettings.main(folderId); @@ -961,7 +959,7 @@ describe('Model Armor tests', () => { assert.equal(output.name, expectedName); }); - it.skip('should get project floor settings', async () => { + it('should get project floor settings', async () => { const getProjectFloorSettings = require('../snippets/getProjectFloorSettings'); const output = await getProjectFloorSettings.main(projectId); @@ -970,21 +968,21 @@ describe('Model Armor tests', () => { assert.equal(output.name, expectedName); }); - it.skip('should update organization floor settings', async () => { + it('should update organization floor settings', async () => { const updateOrganizationFloorSettings = require('../snippets/updateOrganizationFloorSettings'); const output = await updateOrganizationFloorSettings.main(organizationId); // Check that the enableFloorSettingEnforcement=true assert.equal(output.enableFloorSettingEnforcement, true); }); - it.skip('should update folder floor settings', async () => { + it('should update folder floor settings', async () => { const updateFolderFloorSettings = require('../snippets/updateFolderFloorSettings'); const output = await updateFolderFloorSettings.main(folderId); // Check that the enableFloorSettingEnforcement=true assert.equal(output.enableFloorSettingEnforcement, true); }); - it.skip('should update project floor settings', async () => { + it('should update project floor settings', async () => { const updateProjectFloorSettings = require('../snippets/updateProjectFloorSettings'); const output = await updateProjectFloorSettings.main(projectId); // Check that the enableFloorSettingEnforcement=true From 604d26861d4c534f741107bc8d1a59107f616e2b Mon Sep 17 00:00:00 2001 From: Mihir Vala Date: Tue, 8 Jul 2025 13:07:12 +0530 Subject: [PATCH 2/3] chore(tests): added floor setting enable flag exists on get tests --- model-armor/test/modelarmor.test.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/model-armor/test/modelarmor.test.js b/model-armor/test/modelarmor.test.js index d1c1ead614..060acac231 100644 --- a/model-armor/test/modelarmor.test.js +++ b/model-armor/test/modelarmor.test.js @@ -947,6 +947,7 @@ describe('Model Armor tests', () => { const expectedName = `organizations/${organizationId}/locations/global/floorSetting`; assert.equal(output.name, expectedName); + assert.exists(output.enableFloorSettingEnforcement); }); it('should get folder floor settings', async () => { @@ -957,6 +958,7 @@ describe('Model Armor tests', () => { // Check for expected name format in output const expectedName = `folders/${folderId}/locations/global/floorSetting`; assert.equal(output.name, expectedName); + assert.exists(output.enableFloorSettingEnforcement); }); it('should get project floor settings', async () => { @@ -966,6 +968,7 @@ describe('Model Armor tests', () => { // Check for expected name format in output const expectedName = `projects/${projectId}/locations/global/floorSetting`; assert.equal(output.name, expectedName); + assert.exists(output.enableFloorSettingEnforcement); }); it('should update organization floor settings', async () => { From c3dacf198169546215a782dc6b0bfeea2e22c20e Mon Sep 17 00:00:00 2001 From: Mihir Vala Date: Tue, 8 Jul 2025 19:28:24 +0530 Subject: [PATCH 3/3] chore(tests): enabled floor settings clean-up --- model-armor/test/modelarmor.test.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/model-armor/test/modelarmor.test.js b/model-armor/test/modelarmor.test.js index 060acac231..5f9dcab8c0 100644 --- a/model-armor/test/modelarmor.test.js +++ b/model-armor/test/modelarmor.test.js @@ -371,9 +371,8 @@ describe('Model Armor tests', () => { after(async () => { for (const templateName of templatesToDelete) { - // TODO(b/424365799): Uncomment below code once the mentioned issue is resolved // Disable floor settings to restore original state - // await disableFloorSettings(); + await disableFloorSettings(); await deleteTemplate(templateName); }