Expand gh secret acceptance tests
This commit builds on top of work previously done within acceptance tests around gh secret and remote disambiguation. The choice of expanding this existing test rather than creating a new test was in order to keep context together within a single acceptance test rather than splitting it over multiple.
This commit is contained in:
parent
23ea61d325
commit
0da037ca8f
1 changed files with 23 additions and 0 deletions
|
|
@ -34,3 +34,26 @@ stderr 'multiple remotes detected. please specify which repo to use by providing
|
|||
# Secret delete requires disambiguation
|
||||
! exec gh secret delete 'TEST_SECRET_NAME'
|
||||
stderr 'multiple remotes detected. please specify which repo to use by providing the -R, --repo argument'
|
||||
|
||||
# Move out of the fork repo to test whether secret commands work without local repository context
|
||||
cd ..
|
||||
|
||||
# Secret set using --repo flag does not require disambiguation
|
||||
exec gh secret set 'TEST_SECRET_NAME' --body 'TEST_SECRET_VALUE' --repo ${ORG}/${REPO}-fork
|
||||
|
||||
# Secret list using --repo flag does not require disambiguation
|
||||
exec gh secret list --repo ${ORG}/${REPO}-fork
|
||||
stdout 'TEST_SECRET_NAME'
|
||||
|
||||
# Secret delete using --repo flag does not require disambiguation
|
||||
exec gh secret delete 'TEST_SECRET_NAME' --repo ${ORG}/${REPO}-fork
|
||||
|
||||
# Secret set using GH_REPO env var does not require disambiguation
|
||||
exec gh secret set 'TEST_SECRET_NAME2' --body 'TEST_SECRET_VALUE2' --repo ${ORG}/${REPO}-fork
|
||||
|
||||
# Secret list using --repo flag does not require disambiguation
|
||||
exec gh secret list --repo ${ORG}/${REPO}-fork
|
||||
stdout 'TEST_SECRET_NAME2'
|
||||
|
||||
# Secret delete using --repo flag does not require disambiguation
|
||||
exec gh secret delete 'TEST_SECRET_NAME2' --repo ${ORG}/${REPO}-fork
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue