MCPcopy
hub / github.com/openfaas/faas / TestSetReplicasExistentFn

Function TestSetReplicasExistentFn

gateway/plugin/external_test.go:119–138  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

117}
118
119func TestSetReplicasExistentFn(t *testing.T) {
120
121 testServer := httptest.NewServer(
122 http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
123 res.WriteHeader(http.StatusOK)
124 }))
125 defer testServer.Close()
126
127 var injector middleware.AuthInjector
128
129 url, _ := url.Parse(testServer.URL + "/")
130 esq := NewExternalServiceQuery(*url, injector)
131
132 err := esq.SetReplicas("figlet", "", 1)
133
134 if err != nil {
135 t.Logf("Expected err to be nil got: %s ", err.Error())
136 t.Fail()
137 }
138}

Callers

nothing calls this directly

Calls 2

SetReplicasMethod · 0.95
NewExternalServiceQueryFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…