Added acceptance test for repo-delete
This commit is contained in:
parent
18428671c3
commit
83cbdc4f36
1 changed files with 16 additions and 0 deletions
16
acceptance/testdata/repos/repo-delete.txtar
vendored
Normal file
16
acceptance/testdata/repos/repo-delete.txtar
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# Use gh as a credential helper
|
||||
exec gh auth setup-git
|
||||
|
||||
# Create a repository with a file so it has a default branch
|
||||
exec gh repo create $ORG/$SCRIPT_NAME-$RANDOM_STRING --add-readme --private
|
||||
|
||||
# Check that the repo exists
|
||||
exec gh repo view $ORG/$SCRIPT_NAME-$RANDOM_STRING --json name --jq '.name'
|
||||
stdout $SCRIPT_NAME-$RANDOM_STRING
|
||||
|
||||
# Delete the repo
|
||||
exec gh repo delete --yes $ORG/$SCRIPT_NAME-$RANDOM_STRING
|
||||
|
||||
# Ensure that the repo was deleted
|
||||
! exec gh repo view $ORG/$SCRIPT_NAME-$RANDOM_STRING --json name --jq '.name'
|
||||
stderr 'Could not resolve to a Repository with the name'
|
||||
Loading…
Add table
Add a link
Reference in a new issue