Skip to content

Commit

Permalink
Adjust end-to-end CLI test golden output files to the new porchctl ou…
Browse files Browse the repository at this point in the history
…tput
  • Loading branch information
kispaljr committed Aug 23, 2024
1 parent a508832 commit c0f45f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
2 changes: 1 addition & 1 deletion scripts/cleanup-after-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ rm -rf "$self_dir/../.cache"

kubectl get packagerev -A --no-headers | awk '{ print "-n", $1, $2 }' | xargs -L 1 --no-run-if-empty kubectl patch packagerev --type='json' -p='[{"op": "remove", "path": "/metadata/finalizers"}]'

kubectl get ns -o name --no-headers | grep test | xargs -L 1 --no-run-if-empty kubectl delete
kubectl get ns -o name --no-headers | egrep '(test|rpkg-|repo-)' | xargs -L 1 --no-run-if-empty kubectl delete
25 changes: 7 additions & 18 deletions test/e2e/cli/testdata/rpkg-lifecycle/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ commands:
- --repository=git
- --workspace=lifecycle
- lifecycle-package
stdout: "git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 created\n"
stdout: |
git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 created
- args:
- porchctl
- rpkg
Expand All @@ -29,11 +30,8 @@ commands:
- propose-delete
- git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034
- --namespace=rpkg-lifecycle
stderr: "git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 failed (can only propose published packages for deletion; package git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 is not published)\nError: errors:\n can only propose published packages for deletion; package git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 is not published \n"
exitCode: 1
stderr: |
can only propose published packages for deletion; package git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 is not published
Error: errors:
can only propose published packages for deletion; package git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 is not published
- args:
- porchctl
- rpkg
Expand All @@ -51,7 +49,7 @@ commands:
- --namespace=rpkg-lifecycle
- git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034
stdout: |
git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 rejected
git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 no longer proposed for approval
- args:
- porchctl
- rpkg
Expand All @@ -67,11 +65,8 @@ commands:
- propose-delete
- git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034
- --namespace=rpkg-lifecycle
stderr: "git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 failed (can only propose published packages for deletion; package git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 is not published)\nError: errors:\n can only propose published packages for deletion; package git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 is not published \n"
exitCode: 1
stderr: |
can only propose published packages for deletion; package git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 is not published
Error: errors:
can only propose published packages for deletion; package git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 is not published
- args:
- porchctl
- rpkg
Expand Down Expand Up @@ -112,11 +107,8 @@ commands:
- delete
- git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034
- --namespace=rpkg-lifecycle
stderr: "git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 failed (admission webhook \"packagerevdeletion.google.com\" denied the request: failed to delete package revision \"git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034\": published PackageRevisions must be proposed for deletion by setting spec.lifecycle to 'DeletionProposed' prior to deletion)\nError: errors:\n admission webhook \"packagerevdeletion.google.com\" denied the request: failed to delete package revision \"git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034\": published PackageRevisions must be proposed for deletion by setting spec.lifecycle to 'DeletionProposed' prior to deletion \n"
exitCode: 1
stderr: |
git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 failed (admission webhook "packagerevdeletion.google.com" denied the request: failed to delete package revision "git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034": published PackageRevisions must be proposed for deletion by setting spec.lifecycle to 'DeletionProposed' prior to deletion)
Error: errors:
admission webhook "packagerevdeletion.google.com" denied the request: failed to delete package revision "git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034": published PackageRevisions must be proposed for deletion by setting spec.lifecycle to 'DeletionProposed' prior to deletion
- args:
- porchctl
- rpkg
Expand Down Expand Up @@ -156,10 +148,7 @@ commands:
- reject
- git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034
- --namespace=rpkg-lifecycle
stderr: |
cannot reject git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 with lifecycle 'Published'
Error: errors:
cannot reject git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 with lifecycle 'Published'
stderr: "git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 failed (cannot reject git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 with lifecycle 'Published')\nError: errors:\n cannot reject git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 with lifecycle 'Published' \n"
exitCode: 1
- args:
- porchctl
Expand Down

0 comments on commit c0f45f7

Please sign in to comment.