Setup acceptance testing for auth and tests for auth-token and auth-status
This commit is contained in:
parent
6dab689718
commit
665e814c5d
3 changed files with 15 additions and 0 deletions
|
|
@ -63,6 +63,15 @@ func TestAPI(t *testing.T) {
|
|||
testscript.Run(t, testScriptParamsFor(tsEnv, "api"))
|
||||
}
|
||||
|
||||
func TestAuth(t *testing.T) {
|
||||
var tsEnv testScriptEnv
|
||||
if err := tsEnv.fromEnv(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
testscript.Run(t, testScriptParamsFor(tsEnv, "auth"))
|
||||
}
|
||||
|
||||
func TestReleases(t *testing.T) {
|
||||
var tsEnv testScriptEnv
|
||||
if err := tsEnv.fromEnv(); err != nil {
|
||||
|
|
|
|||
3
acceptance/testdata/auth/auth-status.txtar
vendored
Normal file
3
acceptance/testdata/auth/auth-status.txtar
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Check the authentication status
|
||||
exec gh auth status --hostname $GH_HOST
|
||||
stdout $GH_HOST
|
||||
3
acceptance/testdata/auth/auth-token.txtar
vendored
Normal file
3
acceptance/testdata/auth/auth-token.txtar
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Check authentication token
|
||||
exec gh auth token --hostname $GH_HOST
|
||||
stdout $GH_TOKEN
|
||||
Loading…
Add table
Add a link
Reference in a new issue