prancer-io / cloud-validation-framework

prancer platform is an IaC Security engine + Continuous Compliance for your cloud (Azure, AWS, GCP) and Kubernetes environment
https://www.prancer.io
Mozilla Public License 2.0
122 stars 29 forks source link

Validation test output is not storing in windows workstation #289

Open rezoan opened 3 years ago

rezoan commented 3 years ago

The validation test does not store the test output in windows workstation due to invalid path design or it is statically designed for linux only. it always try to append an extra "./" with the current directory to goto the validation folder. though its working fine in linux based OS. Having windows support would be nice.

Step to reproduce: while in the prancer-hello-world directory, run: prancer scenario-pass

You will get below output:

G:\OPA\prancer\source\prancer-hello-world>prancer scenario-pass
←[99m2021-07-07 21:17:58,180 - START: Argument parsing and Run Initialization. Version 1.1.14←[0m
←[99m2021-07-07 21:18:03,903 - Command: 'c:\users\win\appdata\local\programs\python\python39\python.exe C:\Users\WIN\AppData\Local\Programs\Python\Python39\Scripts\prancer scenario-pass'←[0m
←[99m2021-07-07 21:18:03,904 - Using Framework dir: G:\OPA\prancer\source\prancer-hello-world←[0m
←[99m2021-07-07 21:18:03,904 - Args: Namespace(container='scenario-pass', db=0, crawler=False, test=None, compliance=False, customer=None, connector=None, branch=None, file=None, iac=None)←[0m
←[99m2021-07-07 21:18:03,986 - MASTERSNAPSHOTS:←[0m
←[99m2021-07-07 21:18:03,986 -  Collection: scenario-pass,  Type: FILESYSTEM←[0m
←[99m2021-07-07 21:18:03,987 -   LOCATION: G:\OPA\prancer\source\prancer-hello-world/./validation/←[0m
←[99m2021-07-07 21:18:04,010 -   COLLECTION: G:\OPA\prancer\source\prancer-hello-world/./validation/scenario-pass←[0m
←[91m2021-07-07 21:18:04,032 - No mastersnapshot files in G:\OPA\prancer\source\prancer-hello-world/./validation/scenario-pass, exiting!...←[0m
←[99m2021-07-07 21:18:04,032 - SNAPSHOTS:←[0m
←[99m2021-07-07 21:18:04,033 -  Collection: scenario-pass,  Type: FILESYSTEM←[0m
←[99m2021-07-07 21:18:04,034 -   LOCATION: G:\OPA\prancer\source\prancer-hello-world/./validation/←[0m
←[99m2021-07-07 21:18:04,034 -   COLLECTION: G:\OPA\prancer\source\prancer-hello-world/./validation/scenario-pass←[0m
←[99m2021-07-07 21:18:04,072 - ←[0m
←[99m2021-07-07 21:18:04,073 -  SNAPSHOT:G:\OPA\prancer\source\prancer-hello-world/./validation/scenario-pass\snapshot.json←[0m
←[91m2021-07-07 21:18:04,073 - No testcase document found for scenario-pass\snapshot.json ←[0m
←[99m2021-07-07 21:18:04,073 - SNAPSHOTS COMPLETE:←[0m
←[99m2021-07-07 21:18:04,077 - END: Completed the run and cleaning up.←[0m
←[99m2021-07-07 21:18:04,081 - ←[92m Run Stats: {
  "start": "2021-07-07 21:18:03",
  "end": "2021-07-07 21:18:04",
  "errors": [],
  "host": "MTK",
  "timestamp": "2021-07-07 21:18:03",
  "jsonsource": false,
  "database": 0,
  "singletest": false,
  "log": "G:\\OPA\\prancer\\source\\prancer-hello-world/log/20210707-211758.log",
  "duration": "0 seconds"
}←[00m←[0m

Check the validation\scenario-pass directory and output is missing from there as well as missing from console.

farchide commented 3 years ago

@ajeybk Feature Name: prancer support to run on Windows machines

jaiminswan commented 1 year ago

With windows machine available we will try this