MCPcopy
hub / github.com/devtron-labs/devtron / getRestyClient

Function getRestyClient

tests/e2e/BasicTestConf.go:52–63  ·  view source on GitHub ↗

Give resty client along with some basic settings like cookie etc

(setCookie bool)

Source from the content-addressed store, hash-verified

50
51//Give resty client along with some basic settings like cookie etc
52func getRestyClient(setCookie bool) *resty.Client {
53 baseServerUrl, _, _ := getBaseServerDetails()
54 client := resty.New()
55 client.SetBaseURL(baseServerUrl)
56 if(setCookie) {
57 client.SetCookie(&http.Cookie{Name:"argocd.token",
58 Value: getAuthToken(),
59 Path: "/",
60 Domain: baseServerUrl})
61 }
62 return client
63}
64
65//this function will read testEnvironmentConfig.json file and get baseServerUrl, username and pwd depending on environment
66func getBaseServerDetails() (string, string, string) {

Callers 1

makeApiCallFunction · 0.85

Calls 2

getBaseServerDetailsFunction · 0.85
getAuthTokenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…