Fix some lint and vet issues
This commit is contained in:
@@ -29,7 +29,7 @@ func TestGenerateRoots(t *testing.T) {
|
||||
if !strings.HasSuffix(r.URL.Path, "/ct/v1/get-roots") {
|
||||
t.Errorf("Expected path to end with /ct/v1/get-roots, got %s", r.URL.Path)
|
||||
}
|
||||
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(mockResponse)
|
||||
}))
|
||||
@@ -51,7 +51,7 @@ func TestGenerateRoots(t *testing.T) {
|
||||
}
|
||||
|
||||
contentStr := string(content)
|
||||
|
||||
|
||||
// Should contain PEM headers
|
||||
if !strings.Contains(contentStr, "-----BEGIN CERTIFICATE-----") {
|
||||
t.Error("Expected PEM certificate headers")
|
||||
@@ -152,7 +152,7 @@ func TestGenerateRootsSourceURLFormatting(t *testing.T) {
|
||||
if r.URL.Path != expectedPath {
|
||||
t.Errorf("Expected path %s, got %s", expectedPath, r.URL.Path)
|
||||
}
|
||||
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(mockResponse)
|
||||
}))
|
||||
@@ -202,11 +202,11 @@ func TestPEMEncoding(t *testing.T) {
|
||||
if block == nil {
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
if block.Type != "CERTIFICATE" {
|
||||
t.Errorf("Expected block type 'CERTIFICATE', got %s", block.Type)
|
||||
}
|
||||
|
||||
|
||||
certCount++
|
||||
remaining = rest
|
||||
}
|
||||
@@ -214,4 +214,4 @@ func TestPEMEncoding(t *testing.T) {
|
||||
if certCount != 1 {
|
||||
t.Errorf("Expected 1 certificate, found %d", certCount)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user