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

Function TestGithubHTTPClientApp

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

Source from the content-addressed store, hash-verified

927}
928
929func TestGithubHTTPClientApp(t *testing.T) {
930 cfg := Github{
931 Name: "dummy_creds",
932 Description: "dummy github credentials",
933 AuthType: GithubAuthTypeApp,
934 App: GithubApp{
935 AppID: 1,
936 InstallationID: 99,
937 PrivateKeyPath: "../testdata/certs/srv-key.pem",
938 },
939 }
940
941 client, err := cfg.HTTPClient(context.Background())
942 require.Nil(t, err)
943 require.NotNil(t, client)
944
945 transport, ok := client.Transport.(*ghinstallation.Transport)
946 require.True(t, ok)
947 require.NotNil(t, transport)
948}

Callers

nothing calls this directly

Calls 1

HTTPClientMethod · 0.95

Tested by

no test coverage detected