Closed anweiss closed 5 years ago
@minhaj10p could you help with this one? We need to exclude this test since it's dependent on the generated code in templates/catalog.go
@anweiss looks like this issue is related to #35 We do need to exclude this folder and use bash scripts to run this test instead. @farhan-khan30 what do you think?
@anweiss #35 and this current issue are both occurring because the class being tested currently does not exist.
As mentioned in the readme of this test, i.e. "NOTE: This is a test so output.go (generated using oscalkit cli) should already exist when running this test.", cli/main.go generate
has to be run before the test can be executed as I can not test something that does not exist. Since the test imports the generated code, the test will not compile without output.go existing.
The solution to this could be to
1) Exclude the test from CircleCI
2) Create a bash test target that runs the actual test by running cli/main.go generate
, running the actual test, and removing output.go.
@farhan-khan30 let's see if we can go with option 2 that you've proposed, so that we can still run the test against the generated code, rather than excluding it altogether.
@anweiss as suggested in option 2 created PR https://github.com/docker/oscalkit/pull/72. I have created a bash script that will run cli/main.go generate code
before running the test. I have also made some changes to the Makefile
so that make test
will run the test with the NIST profiles before running all the other tests. This test does not handle the profile in profile import scenario for now.
Closing for now. Can revisit other issues separately.
Test fails for
test/main.go
:@farhan-khan30 can you address this?
Supports #10.