MCPcopy Create free account
hub / github.com/docker/go-plugins-helpers / TestActivate

Function TestActivate

authorization/api_test.go:43–59  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

41}
42
43func TestActivate(t *testing.T) {
44 response, err := http.Get("http://localhost:32456/Plugin.Activate")
45 if err != nil {
46 t.Fatal(err)
47 }
48
49 defer response.Body.Close()
50
51 body, err := io.ReadAll(response.Body)
52 if err != nil {
53 t.Fatal(err)
54 }
55
56 if string(body) != manifest+"\n" {
57 t.Fatalf("Expected %s, got %s\n", manifest+"\n", string(body))
58 }
59}
60
61func TestAuthZReq(t *testing.T) {
62 request := `{"User":"bob","UserAuthNMethod":"","RequestMethod":"POST","RequestURI":"http://127.0.0.1/v.1.23/containers/json","RequestBody":"","RequestHeader":"","RequestStatusCode":""}`

Callers

nothing calls this directly

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…