You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
green: backfill wantExitCode annotations across assert/attest/evaluate tests
Add wantExitCode to 44 test cases across 12 files (55 total, up from 11).
Covers compliance failures (exit 1), usage errors (exit 4), and success
regression guards (exit 0) for all assert, attest --assert, and evaluate
command families.
golden: "Error: Artifact with fingerprint '8e568bd886069f1290def0caabc1e97ce0e7b80c105e611258b57d76fcef234c' does not exist in flow 'assert-approval' belonging to organization 'docs-cmd-test-user'\n",
62
63
},
63
64
{
64
-
wantError: true,
65
-
name: "3 asserting an existing artifact that does not have an approval (using --fingerprint) works and exits with non-zero code",
golden: "Error: docker image name or file/dir path is required when --fingerprint is not provided\nUsage: kosli assert approval [IMAGE-NAME | FILE-PATH | DIR-PATH] [flags]\n",
95
+
wantError: true,
96
+
wantExitCode: 4,
97
+
name: "7 not providing --fingerprint nor --artifact-type fails",
golden: "Error: docker image name or file/dir path is required when --fingerprint is not provided\nUsage: kosli assert approval [IMAGE-NAME | FILE-PATH | DIR-PATH] [flags]\n",
95
100
},
96
101
{
97
-
wantError: true,
98
-
name: "8 providing both --fingerprint and --artifact-type fails",
golden: "Error: Artifact with fingerprint '8e568bd886069f1290def0caabc1e97ce0e7b80c105e611258b57d76fcef234c' does not exist in flow 'assert-artifact-one' belonging to organization 'docs-cmd-test-user'\n",
96
97
},
97
98
{
98
-
name: "03 asserting a single existing compliant artifact (using --fingerprint) results in OK and zero exit",
goldenRegex: "(?s)^COMPLIANT\n.*Attestation-name.*See more details at http://localhost(:8001)?/docs-cmd-test-user/flows/assert-artifact-one/artifacts/0089a849fce9c7c9128cd13a2e8b1c0757bdb6a7bad0fdf2800e38c19055b7fc(?:\\?artifact_id=[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{8})?\n",
99
+
name: "03 asserting a single existing compliant artifact (using --fingerprint) results in OK and zero exit",
goldenRegex: "(?s)^COMPLIANT\n.*Attestation-name.*See more details at http://localhost(:8001)?/docs-cmd-test-user/flows/assert-artifact-one/artifacts/0089a849fce9c7c9128cd13a2e8b1c0757bdb6a7bad0fdf2800e38c19055b7fc(?:\\?artifact_id=[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{8})?\n",
101
103
},
102
104
{
103
105
name: "04 json output of asserting a single existing compliant artifact (using --fingerprint) results in OK and zero exit",
golden: "Error: docker image name or file/dir path is required when --fingerprint is not provided\nUsage: kosli assert artifact [IMAGE-NAME | FILE-PATH | DIR-PATH] [flags]\n",
181
+
wantError: true,
182
+
wantExitCode: 4,
183
+
name: "14 not providing --fingerprint nor --artifact-type fails",
golden: "Error: docker image name or file/dir path is required when --fingerprint is not provided\nUsage: kosli assert artifact [IMAGE-NAME | FILE-PATH | DIR-PATH] [flags]\n",
183
186
},
184
187
{
185
-
wantError: true,
186
-
name: "15 providing both --environment and --polices fails",
0 commit comments