MCPcopy Create free account
hub / github.com/cloudbase/garm / TestGithubHTTPClientPAT

Function TestGithubHTTPClientPAT

config/config_test.go:910–927  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

908}
909
910func 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
929func TestGithubHTTPClientApp(t *testing.T) {
930 cfg := Github{

Callers

nothing calls this directly

Calls 1

HTTPClientMethod · 0.95

Tested by

no test coverage detected