Skip to content

Commit c92b2c0

Browse files
committed
squash: fixing sonarcloud secrutiy hotspots
1 parent 500ebc0 commit c92b2c0

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

workspaces/bulk-import/plugins/bulk-import-backend/src/service/handlers/import/imports-gitlab.test.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import { AuthorizeResult } from '@backstage/plugin-permission-common';
2424
import { rest } from 'msw';
2525
import request from 'supertest';
2626

27+
import { randomInt } from 'node:crypto';
28+
2729
import { loadTestFixture, LOCAL_ADDR } from '../../../../__fixtures__/handlers';
2830
import {
2931
setupTest,
@@ -106,9 +108,7 @@ describe('imports', () => {
106108
apiVersion: 'backstage.io/v1alpha1',
107109
kind: 'Location',
108110
metadata: {
109-
name: `generated-from-tests-${Math.floor(
110-
Math.random() * 100 + 1,
111-
)}`,
111+
name: `generated-from-tests-${randomInt(1, 100)}`,
112112
namespace: 'default',
113113
},
114114
},
@@ -247,9 +247,7 @@ describe('imports', () => {
247247
apiVersion: 'backstage.io/v1alpha1',
248248
kind: 'Location',
249249
metadata: {
250-
name: `generated-from-tests-${Math.floor(
251-
Math.random() * 100 + 1,
252-
)}`,
250+
name: `generated-from-tests-${randomInt(1, 100)}`,
253251
namespace: 'default',
254252
},
255253
},

0 commit comments

Comments
 (0)