11import { expect , beforeAll , afterAll } from "vitest" ;
22import * as path from "path" ;
3- import { fileURLToPath } from "url" ;
4- import { dirname } from "path" ;
53import {
64 ansibleMetaDataEntryType ,
75 ansibleMetaDataType ,
86 getAnsibleMetaData ,
97 getResultsThroughCommandRunner ,
108} from "@src/utils/getAnsibleMetaData.js" ;
119import {
10+ FIXTURES_BASE_PATH ,
1211 createTestWorkspaceManager ,
1312 disableExecutionEnvironmentSettings ,
1413 enableExecutionEnvironmentSettings ,
@@ -17,30 +16,23 @@ import {
1716 setFixtureAnsibleCollectionPathEnv ,
1817} from "@test/helper.js" ;
1918
20- const __filename = fileURLToPath ( import . meta. url ) ;
21- const __dirname = dirname ( __filename ) ;
22-
2319function getAnsibleTestInfo ( ) {
2420 const ansibleInfo : ansibleMetaDataEntryType = { } ;
2521 ansibleInfo [ "core version" ] = "." ;
2622 ansibleInfo [ "location" ] = "/ansible" ;
2723 ansibleInfo [ "config file path" ] = path . resolve (
28- __dirname ,
29- ".." ,
30- "fixtures" ,
24+ FIXTURES_BASE_PATH ,
3125 "utils" ,
3226 "getAnsibleMetaData" ,
3327 "ansible.cfg" ,
3428 ) ;
3529 ansibleInfo [ "collections location" ] = [
36- path . resolve ( __dirname , ".." , "fixtures" , "common" , "collections" ) ,
30+ path . resolve ( FIXTURES_BASE_PATH , "common" , "collections" ) ,
3731 ] ;
3832 ansibleInfo [ "module location" ] = [ "/modules" ] ;
3933 ansibleInfo [ "default host list path" ] = [
4034 path . resolve (
41- __dirname ,
42- ".." ,
43- "fixtures" ,
35+ FIXTURES_BASE_PATH ,
4436 "utils" ,
4537 "getAnsibleMetaData" ,
4638 "inventory" ,
0 commit comments