Skip to content

Commit

Permalink
Complete integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kfcampbell committed Nov 28, 2023
1 parent ee0b814 commit fa21723
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions github/authentication/token_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,17 @@ func TestTokenIsSetInAuthenticatedRequest(t *testing.T) {
}
}

func TestDoesItReallyWork(t *testing.T) {
// TODO(kfcampbell): make a more permanent decision about how to structure
// and separately run unit vs. integration tests
func TestHappyPathIntegration(t *testing.T) {
token := os.Getenv("GITHUB_TOKEN")
if token == "" {
t.Errorf("GITHUB_TOKEN must exist")
t.Skip("in order to run integration tests, ensure a valid GITHUB_TOKEN exists in the environment")
}

provider, err := authentication.NewTokenProvider(token)
if err != nil {
t.Error("blah blah blah")
t.Error("instantiating TokenProvider should not error")
}

adapter, err := http.NewNetHttpRequestAdapter(provider)
Expand Down

0 comments on commit fa21723

Please sign in to comment.