Setup acceptance testing for auth and tests for auth-token and auth-status

This commit is contained in:
Tyler McGoffin 2024-10-18 12:58:00 -07:00
parent 6dab689718
commit 665e814c5d
3 changed files with 15 additions and 0 deletions

View file

@ -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 {

View file

@ -0,0 +1,3 @@
# Check the authentication status
exec gh auth status --hostname $GH_HOST
stdout $GH_HOST

View file

@ -0,0 +1,3 @@
# Check authentication token
exec gh auth token --hostname $GH_HOST
stdout $GH_TOKEN