MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / TestHTTPClient_SetAPIToken

Function TestHTTPClient_SetAPIToken

pkg/api/http_test.go:42–49  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

40}
41
42func TestHTTPClient_SetAPIToken(t *testing.T) {
43 client := NewHTTPClient(&http.Client{}, "https://test.example.com", testutils.NewTestLogger())
44 token := "user@realm!tokenid=secret"
45
46 client.SetAPIToken(token)
47
48 assert.Equal(t, token, client.apiToken)
49}
50
51func TestHTTPClient_Get_Success(t *testing.T) {
52 // Create test server

Callers

nothing calls this directly

Calls 3

SetAPITokenMethod · 0.95
NewTestLoggerFunction · 0.92
NewHTTPClientFunction · 0.85

Tested by

no test coverage detected