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
Marked kosli approval commands as depricated server/#5125 (#890)
* Marked kosli approval commands as depricated server/#5125
* Depricate kosli report and kosli request
* test: consolidate per-file deprecation constants into a shared helper
Replaces four near-identical per-file constants (assertApprovalCmdDeprecation,
getApprovalCmdDeprecation, reportApprovalCmdDeprecation, approvalsCmdDeprecation)
with a single cmdDeprecationLine(cmd) helper in testHelpers.go.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
golden: "Error: Artifact with fingerprint '8e568bd886069f1290def0caabc1e97ce0e7b80c105e611258b57d76fcef234c' does not exist in flow 'assert-approval' belonging to organization 'docs-cmd-test-user'\n",
61
+
golden: cmdDeprecationLine("approval") +"Error: Artifact with fingerprint '8e568bd886069f1290def0caabc1e97ce0e7b80c105e611258b57d76fcef234c' does not exist in flow 'assert-approval' belonging to organization 'docs-cmd-test-user'\n",
62
62
},
63
63
{
64
64
wantError: true,
65
65
name: "3 asserting an existing artifact that does not have an approval (using --fingerprint) works and exits with non-zero code",
golden: "Error: artifact with fingerprint fcf33337634c2577a5d86fd7ecb0a25a7c1bb5d89c14fd236f546a5759252c02 has no approvals created\n",
67
+
golden: cmdDeprecationLine("approval") +"Error: artifact with fingerprint fcf33337634c2577a5d86fd7ecb0a25a7c1bb5d89c14fd236f546a5759252c02 has no approvals created\n",
68
68
},
69
69
{
70
70
wantError: true,
71
71
name: "4 asserting approval of an existing artifact that does not have an approval (using --artifact-type) works and exits with non-zero code",
golden: "Error: artifact with fingerprint fcf33337634c2577a5d86fd7ecb0a25a7c1bb5d89c14fd236f546a5759252c02 has no approvals created\n",
73
+
golden: cmdDeprecationLine("approval") +"Error: artifact with fingerprint fcf33337634c2577a5d86fd7ecb0a25a7c1bb5d89c14fd236f546a5759252c02 has no approvals created\n",
74
74
},
75
75
{
76
76
name: "5 asserting approval of an existing artifact that has an approval (using --artifact-type) works and exits with 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",
94
+
golden: cmdDeprecationLine("approval") +"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
95
},
96
96
{
97
97
wantError: true,
98
98
name: "8 providing both --fingerprint and --artifact-type fails",
golden: "Error: artifact with fingerprint fcf33337634c2577a5d86fd7ecb0a25a7c1bb5d89c14fd236f546a5759252c02 is not approved\n",
112
+
golden: cmdDeprecationLine("approval") +"Error: artifact with fingerprint fcf33337634c2577a5d86fd7ecb0a25a7c1bb5d89c14fd236f546a5759252c02 is not approved\n",
golden: "Error: artifact with fingerprint fcf33337634c2577a5d86fd7ecb0a25a7c1bb5d89c14fd236f546a5759252c02 is not approved\n",
123
+
golden: cmdDeprecationLine("approval") +"Error: artifact with fingerprint fcf33337634c2577a5d86fd7ecb0a25a7c1bb5d89c14fd236f546a5759252c02 is not approved\n",
golden: "Error: Approval number '23' does not exist in flow 'get-approval' belonging to organization 'docs-cmd-test-user'\n",
69
+
golden: cmdDeprecationLine("approval") +"Error: Approval number '23' does not exist in flow 'get-approval' belonging to organization 'docs-cmd-test-user'\n",
0 commit comments