(t *testing.T)
| 908 | } |
| 909 | |
| 910 | func TestGithubHTTPClientPAT(t *testing.T) { |
| 911 | cfg := Github{ |
| 912 | Name: "dummy_creds", |
| 913 | Description: "dummy github credentials", |
| 914 | AuthType: GithubAuthTypePAT, |
| 915 | PAT: GithubPAT{ |
| 916 | OAuth2Token: "bogus", |
| 917 | }, |
| 918 | } |
| 919 | |
| 920 | client, err := cfg.HTTPClient(context.Background()) |
| 921 | require.Nil(t, err) |
| 922 | require.NotNil(t, client) |
| 923 | |
| 924 | transport, ok := client.Transport.(*oauth2.Transport) |
| 925 | require.True(t, ok) |
| 926 | require.NotNil(t, transport) |
| 927 | } |
| 928 | |
| 929 | func TestGithubHTTPClientApp(t *testing.T) { |
| 930 | cfg := Github{ |
nothing calls this directly
no test coverage detected