Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[receiver/opencensusreceiver]Use http constants to replace numbers #18830

Merged
merged 1 commit into from
Feb 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions receiver/opencensusreceiver/opencensus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestGrpcGateway_endToEnd(t *testing.T) {
}
]
}`)
req, err := http.NewRequest("POST", url, bytes.NewBuffer(traceJSON))
req, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(traceJSON))
require.NoError(t, err, "Error creating trace POST request: %v", err)
req.Header.Set("Content-Type", "application/json")

Expand Down Expand Up @@ -197,7 +197,7 @@ func TestMetricsGrpcGatewayCors_endToEnd(t *testing.T) {
}

func verifyCorsResp(t *testing.T, url string, origin string, wantStatus int, wantAllowed bool) {
req, err := http.NewRequest("OPTIONS", url, nil)
req, err := http.NewRequest(http.MethodOptions, url, nil)
require.NoError(t, err, "Error creating trace OPTIONS request: %v", err)
req.Header.Set("Origin", origin)
req.Header.Set("Access-Control-Request-Method", "POST")
Expand Down