Skip to content

Commit 3fb47ad

Browse files
committed
Allow contentctl test to work on Windows by fixing a path problem.
1 parent c46f9f7 commit 3fb47ad

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

contentctl/actions/detection_testing/infrastructures/DetectionTestingInfrastructureContainer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def make_container(self) -> docker.models.resource.Model:
7575
mounts = [
7676
docker.types.Mount(
7777
source=str(self.global_config.getLocalAppDir()),
78-
target=str(self.global_config.getContainerAppDir()),
78+
target=(self.global_config.getContainerAppDir()).as_posix(),
7979
type="bind",
8080
read_only=True,
8181
)

contentctl/objects/config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -601,13 +601,13 @@ def dumpCICDPlanAndQuit(self, githash: str, detections:List[Detection]):
601601

602602

603603
def getLocalAppDir(self)->pathlib.Path:
604-
#docker really wants abolsute paths
604+
# docker really wants absolute paths
605605
path = self.path / "apps"
606606
return path.absolute()
607607

608608
def getContainerAppDir(self)->pathlib.Path:
609-
#docker really wants abolsute paths
610-
return pathlib.Path("/tmp/apps").absolute()
609+
# docker really wants absolute paths
610+
return pathlib.Path("/tmp/apps")
611611

612612
def enterpriseSecurityInApps(self)->bool:
613613

@@ -739,7 +739,7 @@ def getContainerEnvironmentString(self,stage_file:bool=False, include_custom_app
739739
if path.startswith(SPLUNKBASE_URL):
740740
container_paths.append(path)
741741
else:
742-
container_paths.append(str(self.getContainerAppDir()/pathlib.Path(path).name))
742+
container_paths.append((self.getContainerAppDir()/pathlib.Path(path).name).as_posix())
743743

744744
return ','.join(container_paths)
745745

0 commit comments

Comments
 (0)