(t *testing.T)
| 125 | } |
| 126 | |
| 127 | func TestHTTPOptions(t *testing.T) { |
| 128 | p := startInstance(t, 2) |
| 129 | defer checkedStop(t, p) |
| 130 | |
| 131 | req, err := http.NewRequest("OPTIONS", "http://127.0.0.1:8082/rest/system/error/clear", nil) |
| 132 | if err != nil { |
| 133 | t.Fatal(err) |
| 134 | } |
| 135 | res, err := http.DefaultClient.Do(req) |
| 136 | if err != nil { |
| 137 | t.Fatal(err) |
| 138 | } |
| 139 | res.Body.Close() |
| 140 | if res.StatusCode != 204 { |
| 141 | t.Fatalf("Status %d != 204 for OPTIONS", res.StatusCode) |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | func TestHTTPPOSTWithoutCSRF(t *testing.T) { |
| 146 | p := startInstance(t, 2) |
nothing calls this directly
no test coverage detected