mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-10-31 02:27:19 -04:00 
			
		
		
		
	telemetry: Remove a metric, clarify another, and fix tests
This commit is contained in:
		
							parent
							
								
									33aeb1cb5c
								
							
						
					
					
						commit
						8039a7127f
					
				| @ -121,9 +121,7 @@ func (cfg *Config) GetCertificate(clientHello *tls.ClientHelloInfo) (*tls.Certif | ||||
| 	// }) | ||||
| 	cert, err := cfg.getCertDuringHandshake(strings.ToLower(clientHello.ServerName), true, true) | ||||
| 	if err == nil { | ||||
| 		go telemetry.Increment("tls_handshake_count") | ||||
| 	} else { | ||||
| 		go telemetry.Append("tls_handshake_error", err.Error()) | ||||
| 		go telemetry.Increment("tls_handshake_count") // TODO: This is a "best guess" for now, we need something listener-level | ||||
| 	} | ||||
| 	return &cert.Certificate, err | ||||
| } | ||||
|  | ||||
| @ -31,7 +31,7 @@ func TestInit(t *testing.T) { | ||||
| 			t.Errorf("Second call to Init should have panicked") | ||||
| 		} | ||||
| 	}() | ||||
| 	Init(id) // should panic | ||||
| 	Init(id, nil) // should panic | ||||
| } | ||||
| 
 | ||||
| func TestInitEmptyUUID(t *testing.T) { | ||||
| @ -41,7 +41,7 @@ func TestInitEmptyUUID(t *testing.T) { | ||||
| 			t.Errorf("Call to Init with empty UUID should have panicked") | ||||
| 		} | ||||
| 	}() | ||||
| 	Init(uuid.UUID([16]byte{})) | ||||
| 	Init(uuid.UUID([16]byte{}), nil) | ||||
| } | ||||
| 
 | ||||
| func TestSet(t *testing.T) { | ||||
| @ -92,7 +92,7 @@ func doInit(t *testing.T) uuid.UUID { | ||||
| 	if err != nil { | ||||
| 		t.Fatalf("Could not make UUID: %v", err) | ||||
| 	} | ||||
| 	Init(id) | ||||
| 	Init(id, nil) | ||||
| 	return id | ||||
| } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user