Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 49 for StatusCode (0.31 sec)

  1. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers_test.go

    				buf:  tt.out,
    				errs: tt.outErrs,
    			}
    			if tt.statusCode == 0 {
    				tt.statusCode = http.StatusOK
    			}
    			recorder := httptest.NewRecorder()
    			SerializeObject(tt.mediaType, encoder, recorder, tt.req, tt.statusCode, tt.object)
    			result := recorder.Result()
    			if result.StatusCode != tt.wantCode {
    				t.Fatalf("unexpected code: %v", result.StatusCode)
    			}
    			if !reflect.DeepEqual(result.Header, tt.wantHeaders) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  2. pilot/cmd/pilot-agent/status/server_test.go

    		resp, err := client.Do(req)
    		if err != nil {
    			t.Fatal("request failed: ", err)
    		}
    		defer resp.Body.Close()
    		if resp.StatusCode != tc.statusCode {
    			t.Errorf("[%v] unexpected status code, want = %v, got = %v", tc.probePath, tc.statusCode, resp.StatusCode)
    		}
    	}
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) { testFn(t, tc) })
    	}
    	// Next we check ever
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  3. tests/integration/security/egress_gateway_origination_test.go

    			testCases := []struct {
    				name            string
    				statusCode      int
    				credentialToUse string
    				useGateway      bool
    			}{
    				// Use CA certificate stored as k8s secret with the same issuing CA as server's CA.
    				// This root certificate can validate the server cert presented by the echoboot server instance.
    				{
    					name:            "simple",
    					statusCode:      http.StatusOK,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 08 22:02:59 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  4. cmd/update.go

    			StatusCode: http.StatusInternalServerError,
    		}
    	}
    	defer xhttp.DrainBody(resp.Body)
    
    	if resp.StatusCode != http.StatusOK {
    		return content, AdminError{
    			Code:       AdminUpdateUnexpectedFailure,
    			Message:    fmt.Sprintf("Error downloading URL %s. Response: %v", u, resp.Status),
    			StatusCode: resp.StatusCode,
    		}
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook_v1_test.go

    		// regular errors return errors but do not retry
    		{name: "404 doesnt retry", attr: aliceAttr, allow: false, statusCode: 404, expectedErr: true, expectedAuthorized: false, expectedCalls: 1},
    		{name: "403 doesnt retry", attr: aliceAttr, allow: false, statusCode: 403, expectedErr: true, expectedAuthorized: false, expectedCalls: 1},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 43.2K bytes
    - Viewed (0)
  6. pkg/spiffe/spiffe_test.go

    		t.Errorf("Unexpected spiffe URI for empty namespace and service account: %s", nonsense)
    	}
    }
    
    type handler struct {
    	statusCode int
    	body       []byte
    }
    
    func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
    	w.WriteHeader(h.statusCode)
    	w.Write(h.body)
    }
    
    func TestRetrieveSpiffeBundleRootCerts(t *testing.T) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 18.1K bytes
    - Viewed (0)
  7. cmd/object-lambda-handlers.go

    	"Not Extended":                    http.StatusNotExtended,
    	"Network Authentication Required": http.StatusNetworkAuthenticationRequired,
    }
    
    // StatusCode returns a HTTP Status code for the HTTP text. It returns -1
    // if the text is unknown.
    func StatusCode(text string) int {
    	if code, ok := statusTextToCode[text]; ok {
    		return code
    	}
    	return -1
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  8. tests/integration/security/sds_ingress/ingress_test.go

    								ingressutil.ExpectedResponse{StatusCode: http.StatusOK})
    						})
    						t.NewSubTest("request with client certificates").Run(func(t framework.TestContext) {
    							// Send a TLS request with client certificates.
    							ingressutil.SendRequestOrFail(t, ing, host, credName, ingressutil.Mtls, tlsContext,
    								ingressutil.ExpectedResponse{StatusCode: http.StatusOK})
    						})
    					})
    			}
    		})
    }
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 08 22:02:59 UTC 2024
    - 32.7K bytes
    - Viewed (0)
  9. tests/integration/security/egress_sidecar_tls_origination_test.go

    					credentialToUse:  credNameGeneric,
    					from:             apps.Ns1.A,
    					drSelector:       "a",
    					authorizeSidecar: true,
    					expectedResponse: ingressutil.ExpectedResponse{
    						StatusCode: http.StatusOK,
    					},
    				},
    				// Mutual TLS origination from an unauthorized sidecar to https endpoint
    				// This will result in a 503 with the UH flag because the cluster will
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 08 22:02:59 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/server/genericapiserver_test.go

    		assert.NoError(err)
    		data, _ := io.ReadAll(resp.Body)
    		if http.StatusOK != resp.StatusCode {
    			t.Logf("got %d", resp.StatusCode)
    			t.Log(string(data))
    			return false, nil
    		}
    		return true, nil
    	}))
    	resp, err = http.Get(server.URL + "/healthz/ping")
    	assert.NoError(err)
    	assert.Equal(http.StatusOK, resp.StatusCode)
    }
    
    func TestUpdateOpenAPISpec(t *testing.T) {
    	_, ctx := ktesting.NewTestContext(t)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 18:59:21 UTC 2024
    - 23.2K bytes
    - Viewed (0)
Back to top