-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(generate): add testing for generate profile
- Loading branch information
1 parent
d301564
commit 5e694ab
Showing
14 changed files
with
245 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/test/e2e/cmd/testdata/generate/generate-profile.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
profile: | ||
imports: | ||
- href: ../../unit/common/oscal/catalog.yaml | ||
include-controls: | ||
- with-ids: | ||
- ac-1 | ||
- ac-2 | ||
- ac-3 | ||
merge: | ||
as-is: true | ||
metadata: | ||
last-modified: XXX | ||
oscal-version: 1.1.2 | ||
props: | ||
- name: generation | ||
ns: https://docs.lula.dev/oscal/ns | ||
value: profile --source ../../unit/common/oscal/catalog.yaml --include ac-1,ac-3,ac-2 | ||
published: XXX | ||
remarks: Profile generated from Lula | ||
title: Profile | ||
version: 0.0.1 | ||
uuid: XXX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Generation of a Profile OSCAL artifact with controls included or excluded from a source catalog/profile. | ||
|
||
Usage: | ||
profile [flags] | ||
|
||
Aliases: | ||
profile, p | ||
|
||
Examples: | ||
|
||
To generate a profile with included controls: | ||
lula generate profile -s <catalog/profile source> -i ac-1,ac-2,ac-3 | ||
|
||
To specify the name and filetype of the generated artifact: | ||
lula generate profile -s <catalog/profile source> -i ac-1,ac-2,ac-3 -o my_profile.yaml | ||
|
||
To generate a profile that includes all controls except a list specified controls: | ||
lula generate profile -s <catalog/profile source> -e ac-1,ac-2,ac-3 | ||
|
||
|
||
Flags: | ||
-e, --exclude strings comma delimited list of controls to exclude from the source catalog/profile | ||
-h, --help help for profile | ||
-i, --include strings comma delimited list of controls to include from the source catalog/profile | ||
-o, --output-file string the path to the output file. If not specified, the output file will be directed to stdout | ||
-s, --source string the path to the source catalog/profile |
Oops, something went wrong.