INNER CODE UNIT · Go

func

dikhan/terraform-provider-openapi · openapi/common_test.go:82

func (f faultyReader) Read(p []byte) (n int, err error) {
	return 0, f.err
}

func (f faultyReader) Close() error {
	return f.err
}

func TestCheckHTTPStatusCode(t *testing.T) {
	testCases := []struct {
		name             string
		inputResponse    *http.Response
		inputStatusCodes []int
		expectedError    error
	}{
		{
			name: "response containing a status codes that matches one of the expected response status codes",
			inputResponse: &http.Response{

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…