oscal-compass / compliance-trestle

An opinionated tooling platform for managing compliance as code, using continuous integration and NIST's OSCAL standard.
https://oscal-compass.github.io/compliance-trestle
Apache License 2.0
160 stars 62 forks source link

make test fails in trestle development environment when there is a pre-exisiting trestle workspace in /tmp #1525

Open degenaro opened 7 months ago

degenaro commented 7 months ago

Describe the bug

During trestle development, if there is a pre-existing workspace in /tmp when make test is run several tests will fail. The quick fix is to remove the trestle workspace from /tmp.

In the longer term, the tests should not rely upon a pristine /tmp folder, e.g. one without an existing trestle workspace.

To Reproduce

Steps to reproduce the behavior:

  1. create trestle development environment, comprising python venv and download of trestle develop branch.
  2. use trestle init to create trestle workspace in the /tmp folder
  3. run make test in the downloaded trestle devlop branch
  4. See errors

Expected behavior

The errors should not occur, regardless of the presence of a trestle workspace in /tmp

Screenshots / Logs.

N/A

Environment

a-memesh commented 3 months ago

Hey @degenaro, I wasn't able to reproduce the error. Here's what I did:

According to the issue description, I'm supposed to get errors, but I only got a warning. Here's a screenshot:

image

degenaro commented 3 months ago

You did this?

use trestle init to create trestle workspace in the /tmp folder

That is, the absolute path to /tmp.

cd /tmp trestle init

Your don't need to create a tmp folder. You need to do a trestle init in your user's existing root /tmp folder to cause this problem.