@@ -473,44 +473,3 @@ func TestConstants(t *testing.T) {
473
473
t .Parallel ()
474
474
assert .Equal (t , "default" , defaultSecretsProviderName )
475
475
}
476
-
477
- // Test for endpoint path validation
478
- func TestEndpointPaths (t * testing.T ) {
479
- t .Parallel ()
480
- router := SecretsRouter ()
481
-
482
- // Test that the router responds to expected paths
483
- testCases := []struct {
484
- method string
485
- path string
486
- }{
487
- {http .MethodPost , "/" },
488
- {http .MethodGet , "/default" },
489
- {http .MethodGet , "/default/keys" },
490
- {http .MethodPost , "/default/keys" },
491
- {http .MethodPut , "/default/keys/test-key" },
492
- {http .MethodDelete , "/default/keys/test-key" },
493
- }
494
-
495
- for _ , tc := range testCases {
496
- tc := tc
497
- t .Run (tc .method + "_" + tc .path , func (t * testing.T ) {
498
- t .Parallel ()
499
- var req * http.Request
500
- if tc .method == http .MethodPost || tc .method == http .MethodPut {
501
- body := `{"test": "data"}`
502
- req = httptest .NewRequest (tc .method , tc .path , strings .NewReader (body ))
503
- req .Header .Set ("Content-Type" , "application/json" )
504
- } else {
505
- req = httptest .NewRequest (tc .method , tc .path , nil )
506
- }
507
-
508
- w := httptest .NewRecorder ()
509
- router .ServeHTTP (w , req )
510
-
511
- // We expect some response (not 404 Not Found)
512
- // The actual response code will depend on the handler logic
513
- assert .NotEqual (t , http .StatusNotFound , w .Code , "Route should be defined" )
514
- })
515
- }
516
- }
0 commit comments