Skip to content

Commit 1dc68db

Browse files
sfilangio01RafaelAPB
authored andcommitted
fix(tests): correct property name for 'forbidNonWhitelisted' test
The unit test for the ValidatorOptions was using an incorrect property name, 'forbidNonallowlisted', which caused the validation check to be bypassed. This commit updates the test case to use the correct property name, 'forbidNonWhitelisted', ensuring that the validation logic is properly tested. Signed-off-by: sfilangio01 <[email protected]>
1 parent 26615b3 commit 1dc68db

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

packages/cactus-plugin-satp-hermes/src/test/typescript/unit/config-validating-functions/validate-satp-validation-options.test.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe("validateSatpValidationOptions", () => {
1515
skipNullProperties: true,
1616
skipMissingProperties: true,
1717
allowlist: false,
18-
forbidNonallowlisted: false,
18+
forbidNonWhitelisted: false,
1919
groups: ["group1", "group2"],
2020
always: false,
2121
strictGroups: true,
@@ -40,7 +40,7 @@ describe("validateSatpValidationOptions", () => {
4040
skipNullProperties: true,
4141
skipMissingProperties: true,
4242
allowlist: false,
43-
forbidNonallowlisted: false,
43+
forbidNonWhitelisted: false,
4444
groups: ["group1", "group2"],
4545
always: false,
4646
strictGroups: true,
@@ -64,7 +64,7 @@ describe("validateSatpValidationOptions", () => {
6464
skipNullProperties: true,
6565
skipMissingProperties: true,
6666
allowlist: false,
67-
forbidNonallowlisted: false,
67+
forbidNonWhitelisted: false,
6868
groups: ["group1", "group2"],
6969
always: false,
7070
strictGroups: true,
@@ -90,7 +90,7 @@ describe("validateSatpValidationOptions", () => {
9090
skipNullProperties: true,
9191
skipMissingProperties: true,
9292
allowlist: false,
93-
forbidNonallowlisted: false,
93+
forbidNonWhitelisted: false,
9494
groups: "group1",
9595
always: false,
9696
strictGroups: true,
@@ -116,7 +116,7 @@ describe("validateSatpValidationOptions", () => {
116116
skipNullProperties: true,
117117
skipMissingProperties: true,
118118
allowlist: false,
119-
forbidNonallowlisted: false,
119+
forbidNonWhitelisted: false,
120120
groups: ["group1", "group2"],
121121
always: false,
122122
strictGroups: true,
@@ -142,7 +142,7 @@ describe("validateSatpValidationOptions", () => {
142142
skipNullProperties: true,
143143
skipMissingProperties: true,
144144
allowlist: false,
145-
forbidNonallowlisted: false,
145+
forbidNonWhitelisted: false,
146146
groups: ["group1", "group2"],
147147
always: false,
148148
strictGroups: true,
@@ -168,7 +168,7 @@ describe("validateSatpValidationOptions", () => {
168168
skipNullProperties: 123,
169169
skipMissingProperties: true,
170170
allowlist: false,
171-
forbidNonallowlisted: false,
171+
forbidNonWhitelisted: false,
172172
groups: ["group1", "group2"],
173173
always: false,
174174
strictGroups: true,
@@ -194,7 +194,7 @@ describe("validateSatpValidationOptions", () => {
194194
skipNullProperties: false,
195195
skipMissingProperties: "true",
196196
allowlist: false,
197-
forbidNonallowlisted: false,
197+
forbidNonWhitelisted: false,
198198
groups: ["group1", "group2"],
199199
always: false,
200200
strictGroups: true,
@@ -220,7 +220,7 @@ describe("validateSatpValidationOptions", () => {
220220
skipNullProperties: false,
221221
skipMissingProperties: true,
222222
allowlist: 123,
223-
forbidNonallowlisted: false,
223+
forbidNonWhitelisted: false,
224224
groups: ["group1", "group2"],
225225
always: false,
226226
strictGroups: true,
@@ -239,14 +239,14 @@ describe("validateSatpValidationOptions", () => {
239239
).toThrowError(`Invalid config.validationOptions: ${validatorOptions}.`);
240240
});
241241

242-
it("should throw when the 'forbidNonallowlisted' option is not a boolean", () => {
242+
it("should throw when the 'forbidNonWhitelisted' option is not a boolean", () => {
243243
const validatorOptions = {
244244
enableDebugMessages: true,
245245
skipUndefinedProperties: false,
246246
skipNullProperties: true,
247247
skipMissingProperties: true,
248248
allowlist: false,
249-
forbidNonallowlisted: 123,
249+
forbidNonWhitelisted: 123,
250250
groups: ["group1", "group2"],
251251
always: false,
252252
strictGroups: true,
@@ -272,7 +272,7 @@ describe("validateSatpValidationOptions", () => {
272272
skipNullProperties: true,
273273
skipMissingProperties: true,
274274
allowlist: false,
275-
forbidNonallowlisted: true,
275+
forbidNonWhitelisted: true,
276276
groups: ["group1", "group2"],
277277
always: "false",
278278
strictGroups: true,
@@ -298,7 +298,7 @@ describe("validateSatpValidationOptions", () => {
298298
skipNullProperties: true,
299299
skipMissingProperties: true,
300300
allowlist: false,
301-
forbidNonallowlisted: true,
301+
forbidNonWhitelisted: true,
302302
groups: ["group1", "group2"],
303303
always: false,
304304
strictGroups: 123,
@@ -324,7 +324,7 @@ describe("validateSatpValidationOptions", () => {
324324
skipNullProperties: true,
325325
skipMissingProperties: true,
326326
allowlist: false,
327-
forbidNonallowlisted: true,
327+
forbidNonWhitelisted: true,
328328
groups: ["group1", "group2"],
329329
always: false,
330330
strictGroups: true,
@@ -350,7 +350,7 @@ describe("validateSatpValidationOptions", () => {
350350
skipNullProperties: true,
351351
skipMissingProperties: true,
352352
allowlist: false,
353-
forbidNonallowlisted: true,
353+
forbidNonWhitelisted: true,
354354
groups: ["group1", "group2"],
355355
always: false,
356356
strictGroups: true,
@@ -376,7 +376,7 @@ describe("validateSatpValidationOptions", () => {
376376
skipNullProperties: true,
377377
skipMissingProperties: true,
378378
allowlist: false,
379-
forbidNonallowlisted: true,
379+
forbidNonWhitelisted: true,
380380
groups: ["group1", "group2"],
381381
always: false,
382382
strictGroups: true,

0 commit comments

Comments
 (0)