MCPcopy
hub / github.com/oauth2-proxy/oauth2-proxy / testGitLabProvider

Function testGitLabProvider

providers/gitlab_test.go:16–37  ·  view source on GitHub ↗
(hostname, scope string, opts options.Provider)

Source from the content-addressed store, hash-verified

14)
15
16func testGitLabProvider(hostname, scope string, opts options.Provider) (*GitLabProvider, error) {
17 p, err := NewGitLabProvider(
18 &ProviderData{
19 ProviderName: "",
20 LoginURL: &url.URL{},
21 RedeemURL: &url.URL{},
22 ProfileURL: &url.URL{},
23 ValidateURL: &url.URL{},
24 Scope: scope},
25 opts)
26 if err != nil {
27 return nil, err
28 }
29 if hostname != "" {
30 updateURL(p.Data().LoginURL, hostname)
31 updateURL(p.Data().RedeemURL, hostname)
32 updateURL(p.Data().ProfileURL, hostname)
33 updateURL(p.Data().ValidateURL, hostname)
34 }
35
36 return p, err
37}
38
39func testGitLabBackend() *httptest.Server {
40 userInfo := `

Callers 1

gitlab_test.goFile · 0.85

Calls 3

NewGitLabProviderFunction · 0.85
updateURLFunction · 0.85
DataMethod · 0.65

Tested by

no test coverage detected