Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for NewTestServerWithHandler (0.24 sec)

  1. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/testing/webhook_server.go

    	"k8s.io/apiserver/pkg/admission/plugin/webhook/testcerts"
    	testingclock "k8s.io/utils/clock/testing"
    )
    
    // NewTestServerWithHandler returns a webhook test HTTPS server
    // which uses given handler function to handle requests
    func NewTestServerWithHandler(t testing.TB, handler func(http.ResponseWriter, *http.Request)) *httptest.Server {
    	// Create the test webhook server
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 15 11:11:25 UTC 2021
    - 6.3K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/plugin_test.go

    }
    
    // TestWebhookDuration tests that MutatingWebhook#Admit sets webhook duration in context correctly
    func TestWebhookDuration(ts *testing.T) {
    	clk := clocktesting.FakeClock{}
    	testServer := webhooktesting.NewTestServerWithHandler(ts, webhooktesting.ClockSteppingWebhookHandler(ts, &clk))
    	testServer.StartTLS()
    	defer testServer.Close()
    	serverURL, err := url.ParseRequestURI(testServer.URL)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:52 UTC 2024
    - 11K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/plugin_test.go

    // TestValidateWebhookDuration tests that ValidatingWebhook#Validate sets webhook duration in context correctly
    func TestValidateWebhookDuration(ts *testing.T) {
    	clk := clocktesting.FakeClock{}
    	testServer := webhooktesting.NewTestServerWithHandler(ts, webhooktesting.ClockSteppingWebhookHandler(ts, &clk))
    	testServer.StartTLS()
    	defer testServer.Close()
    	serverURL, err := url.ParseRequestURI(testServer.URL)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:52 UTC 2024
    - 11.9K bytes
    - Viewed (0)
Back to top