@@ -210,35 +210,6 @@ func TestGetEnvInt64(t *testing.T) {
210210 }
211211}
212212
213- func TestValidateTLSClientConfig (t * testing.T ) {
214- tests := []struct {
215- name string
216- certFile string
217- keyFile string
218- expectError bool
219- }{
220- {"both files provided" , "/path/to/cert.pem" , "/path/to/key.pem" , false },
221- {"both files empty" , "" , "" , false },
222- {"only cert file provided" , "/path/to/cert.pem" , "" , true },
223- {"only key file provided" , "" , "/path/to/key.pem" , true },
224- }
225-
226- for _ , tt := range tests {
227- t .Run (tt .name , func (t * testing.T ) {
228- err := validateTLSClientConfig (tt .certFile , tt .keyFile )
229- if tt .expectError {
230- if err == nil {
231- t .Errorf ("validateTLSClientConfig(%s, %s) expected error but got none" , tt .certFile , tt .keyFile )
232- }
233- } else {
234- if err != nil {
235- t .Errorf ("validateTLSClientConfig(%s, %s) unexpected error: %v" , tt .certFile , tt .keyFile , err )
236- }
237- }
238- })
239- }
240- }
241-
242213func TestLoadScripts (t * testing.T ) {
243214 // Create temporary directory for test scripts
244215 tmpDir := t .TempDir ()
@@ -368,15 +339,6 @@ func TestMainFunctionsIntegration(t *testing.T) {
368339 t .Errorf ("Script content mismatch" )
369340 }
370341
371- // Test TLS validation
372- if err := validateTLSClientConfig ("/cert.pem" , "" ); err == nil {
373- t .Error ("Expected TLS validation error for mismatched cert/key" )
374- }
375-
376- if err := validateTLSClientConfig ("/cert.pem" , "/key.pem" ); err != nil {
377- t .Errorf ("Unexpected TLS validation error: %v" , err )
378- }
379-
380342 // Test registry creation
381343 registry := createPrometheusRegistry (true )
382344 if registry == nil {
0 commit comments