File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
workspaces/bulk-import/plugins/bulk-import-backend/src/service/handlers/import Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ import { AuthorizeResult } from '@backstage/plugin-permission-common';
2424import { rest } from 'msw' ;
2525import request from 'supertest' ;
2626
27+ import { randomInt } from 'node:crypto' ;
28+
2729import { loadTestFixture , LOCAL_ADDR } from '../../../../__fixtures__/handlers' ;
2830import {
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 } ,
You can’t perform that action at this time.
0 commit comments