mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
Drop names in slices
This commit is contained in:
@@ -42,14 +42,14 @@ type proxyTest struct {
|
||||
|
||||
var proxyTests = []proxyTest{
|
||||
// valid alertmanager and methods
|
||||
proxyTest{
|
||||
{
|
||||
method: "POST",
|
||||
localPath: "/proxy/alertmanager/dummy/api/v1/silences",
|
||||
upstreamURI: "http://localhost:9093/api/v1/silences",
|
||||
code: 200,
|
||||
response: "{\"status\":\"success\",\"data\":{\"silenceId\":\"d8a61ca8-ee2e-4076-999f-276f1e986bf3\"}}",
|
||||
},
|
||||
proxyTest{
|
||||
{
|
||||
method: "DELETE",
|
||||
localPath: "/proxy/alertmanager/dummy/api/v1/silence/d8a61ca8-ee2e-4076-999f-276f1e986bf3",
|
||||
upstreamURI: "http://localhost:9093/api/v1/silence/d8a61ca8-ee2e-4076-999f-276f1e986bf3",
|
||||
@@ -57,14 +57,14 @@ var proxyTests = []proxyTest{
|
||||
response: "{\"status\":\"success\"}",
|
||||
},
|
||||
// invalid alertmanager name
|
||||
proxyTest{
|
||||
{
|
||||
method: "POST",
|
||||
localPath: "/proxy/alertmanager/INVALID/api/v1/silences",
|
||||
upstreamURI: "",
|
||||
code: 404,
|
||||
response: "404 page not found",
|
||||
},
|
||||
proxyTest{
|
||||
{
|
||||
method: "DELETE",
|
||||
localPath: "/proxy/alertmanager/INVALID/api/v1/silence/d8a61ca8-ee2e-4076-999f-276f1e986bf3",
|
||||
upstreamURI: "http://localhost:9093/api/v1/silence/d8a61ca8-ee2e-4076-999f-276f1e986bf3",
|
||||
@@ -72,14 +72,14 @@ var proxyTests = []proxyTest{
|
||||
response: "404 page not found",
|
||||
},
|
||||
// valid alertmanager name, but invalid method
|
||||
proxyTest{
|
||||
{
|
||||
method: "GET",
|
||||
localPath: "/proxy/alertmanager/dummy/api/v1/silences",
|
||||
upstreamURI: "",
|
||||
code: 404,
|
||||
response: "404 page not found",
|
||||
},
|
||||
proxyTest{
|
||||
{
|
||||
method: "GET",
|
||||
localPath: "/proxy/alertmanager/dummy/api/v1/silence/d8a61ca8-ee2e-4076-999f-276f1e986bf3",
|
||||
upstreamURI: "http://localhost:9093/api/v1/silence/d8a61ca8-ee2e-4076-999f-276f1e986bf3",
|
||||
|
||||
Reference in New Issue
Block a user