Cleanup some inconsistencies and improve collapse some functionality
This commit is contained in:
parent
95ed11d9ba
commit
e7549c93f9
9 changed files with 17 additions and 26 deletions
|
|
@ -23,4 +23,4 @@ exec gh repo unarchive $ORG/$SCRIPT_NAME-$RANDOM_STRING --yes
|
|||
|
||||
# Check that the repo is unarchived
|
||||
exec gh repo view $ORG/$SCRIPT_NAME-$RANDOM_STRING --json=isArchived --jq='.isArchived'
|
||||
stdout false
|
||||
stdout false
|
||||
|
|
|
|||
2
acceptance/testdata/repos/repo-clone.txtar
vendored
2
acceptance/testdata/repos/repo-clone.txtar
vendored
|
|
@ -12,4 +12,4 @@ exec gh repo clone $ORG/$SCRIPT_NAME-$RANDOM_STRING
|
|||
|
||||
# Ensure the repo was cloned
|
||||
exec ls $SCRIPT_NAME-$RANDOM_STRING
|
||||
stdout README.md
|
||||
stdout README.md
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@ exec gh repo create $ORG/$SCRIPT_NAME-$RANDOM_STRING --add-readme --private
|
|||
defer gh repo delete --yes $ORG/$SCRIPT_NAME-$RANDOM_STRING
|
||||
|
||||
# Check that the repo exists
|
||||
exec gh repo view $ORG/$SCRIPT_NAME-$RANDOM_STRING --json name --jq '.name'
|
||||
stdout $SCRIPT_NAME-$RANDOM_STRING
|
||||
exec gh repo view $ORG/$SCRIPT_NAME-$RANDOM_STRING --json=name --jq='.name'
|
||||
stdout $SCRIPT_NAME-$RANDOM_STRING
|
||||
|
|
|
|||
2
acceptance/testdata/repos/repo-delete.txtar
vendored
2
acceptance/testdata/repos/repo-delete.txtar
vendored
|
|
@ -13,4 +13,4 @@ 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'
|
||||
stderr 'Could not resolve to a Repository with the name'
|
||||
|
|
|
|||
|
|
@ -32,4 +32,3 @@ exec gh repo deploy-key list --json=id --jq='.[].id'
|
|||
|
||||
-- deployKey.pub --
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAZmdeRNskfpvYL5YHB/YJaW8hTEXpnvPMkx5Ri+YwUr myTitle
|
||||
|
||||
|
|
|
|||
4
acceptance/testdata/repos/repo-edit.txtar
vendored
4
acceptance/testdata/repos/repo-edit.txtar
vendored
|
|
@ -9,11 +9,11 @@ defer gh repo delete --yes $ORG/$SCRIPT_NAME-$RANDOM_STRING
|
|||
|
||||
# Check that the repo description is empty
|
||||
exec gh repo view $ORG/$SCRIPT_NAME-$RANDOM_STRING --json description --jq '.description'
|
||||
stdout ''
|
||||
! stdout '.'
|
||||
|
||||
# Edit the repo description
|
||||
exec gh repo edit $ORG/$SCRIPT_NAME-$RANDOM_STRING --description 'newDescription'
|
||||
|
||||
# Check that the repo description is updated
|
||||
exec gh repo view $ORG/$SCRIPT_NAME-$RANDOM_STRING --json description --jq '.description'
|
||||
stdout 'newDescription'
|
||||
stdout 'newDescription'
|
||||
|
|
|
|||
|
|
@ -41,4 +41,4 @@ exec ls
|
|||
stdout asset.txt
|
||||
|
||||
-- asset.txt --
|
||||
Hello, world!
|
||||
Hello, world!
|
||||
|
|
|
|||
15
acceptance/testdata/repos/repo-list-rename.txtar
vendored
15
acceptance/testdata/repos/repo-list-rename.txtar
vendored
|
|
@ -5,20 +5,15 @@ exec gh auth setup-git
|
|||
exec gh repo create $ORG/$SCRIPT_NAME-$RANDOM_STRING --add-readme --private
|
||||
|
||||
# List the repos and check for the new repo
|
||||
exec gh repo list $ORG --json name --jq '.[].name'
|
||||
exec gh repo list $ORG --json=name --jq='.[].name'
|
||||
stdout $SCRIPT_NAME-$RANDOM_STRING
|
||||
|
||||
# Rename the repo
|
||||
exec gh repo rename $SCRIPT_NAME-$RANDOM_STRING-renamed --repo=$ORG/$SCRIPT_NAME-$RANDOM_STRING --yes
|
||||
|
||||
# Defer repo deletion
|
||||
defer gh repo delete $ORG/$SCRIPT_NAME-$RANDOM_STRING-renamed --yes
|
||||
|
||||
# List the repos and check for the renamed repo
|
||||
exec gh repo list $ORG --json name --jq '.[].name'
|
||||
exec gh repo list $ORG --json=name --jq='.[].name'
|
||||
stdout $SCRIPT_NAME-$RANDOM_STRING-renamed
|
||||
|
||||
# Delete the renamed repo
|
||||
exec gh repo delete $ORG/$SCRIPT_NAME-$RANDOM_STRING-renamed --yes
|
||||
|
||||
# List the repos and check for the deleted repo
|
||||
exec gh repo list $ORG --json name --jq '.[].name'
|
||||
! stdout $SCRIPT_NAME-$RANDOM_STRING-renamed
|
||||
|
||||
|
|
|
|||
11
acceptance/testdata/repos/repo-set-default.txtar
vendored
11
acceptance/testdata/repos/repo-set-default.txtar
vendored
|
|
@ -1,17 +1,14 @@
|
|||
# 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
|
||||
# Create and clone a repository with a file so it has a default branch
|
||||
exec gh repo create $ORG/$SCRIPT_NAME-$RANDOM_STRING --add-readme --private --clone
|
||||
|
||||
# Defer repo cleanup
|
||||
defer gh repo delete --yes $ORG/$SCRIPT_NAME-$RANDOM_STRING
|
||||
|
||||
# Clone the repo
|
||||
exec gh repo clone $ORG/$SCRIPT_NAME-$RANDOM_STRING
|
||||
cd $SCRIPT_NAME-$RANDOM_STRING
|
||||
|
||||
# Ensure that no default is set
|
||||
cd $SCRIPT_NAME-$RANDOM_STRING
|
||||
exec gh repo set-default --view
|
||||
stderr 'no default repository has been set; use `gh repo set-default` to select one'
|
||||
|
||||
|
|
@ -20,4 +17,4 @@ exec gh repo set-default $ORG/$SCRIPT_NAME-$RANDOM_STRING
|
|||
|
||||
# Check that the default is set
|
||||
exec gh repo set-default --view
|
||||
stdout $ORG/$SCRIPT_NAME-$RANDOM_STRING
|
||||
stdout $ORG/$SCRIPT_NAME-$RANDOM_STRING
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue