Fix some lint and vet issues
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
func TestGenerateEnv(t *testing.T) {
|
||||
tmpDir := t.TempDir()
|
||||
|
||||
|
||||
// Create test directories
|
||||
testLogDir := filepath.Join(tmpDir, "test-log")
|
||||
testLog2Dir := filepath.Join(tmpDir, "test-log-2")
|
||||
@@ -25,11 +25,11 @@ func TestGenerateEnv(t *testing.T) {
|
||||
// Create test roots files
|
||||
rootsFile := filepath.Join(tmpDir, "roots.pem")
|
||||
extraRootsFile := filepath.Join(tmpDir, "extra-roots.pem")
|
||||
|
||||
|
||||
rootsContent := `-----BEGIN CERTIFICATE-----
|
||||
MIIBkTCB+wIJAKZJ...
|
||||
-----END CERTIFICATE-----`
|
||||
|
||||
|
||||
extraRootsContent := `-----BEGIN CERTIFICATE-----
|
||||
MIIBkTCB+wIJAKZK...
|
||||
-----END CERTIFICATE-----`
|
||||
@@ -80,7 +80,7 @@ logs:
|
||||
}
|
||||
|
||||
envStr := string(envContent)
|
||||
|
||||
|
||||
// Check TESSERACT_ARGS contains expected values
|
||||
if !strings.Contains(envStr, "TESSERACT_ARGS=") {
|
||||
t.Error("Expected TESSERACT_ARGS in .env file")
|
||||
@@ -199,7 +199,7 @@ func TestCreateCombinedRootsPemWithStatus(t *testing.T) {
|
||||
|
||||
func TestGenerateEnvMissingDirectory(t *testing.T) {
|
||||
tmpDir := t.TempDir()
|
||||
|
||||
|
||||
// Create config with non-existent directory
|
||||
configContent := `logs:
|
||||
- shortname: "test-log"
|
||||
@@ -216,4 +216,4 @@ func TestGenerateEnvMissingDirectory(t *testing.T) {
|
||||
// Should call log.Fatalf which exits the program
|
||||
// We can't easily test this without subprocess, so we'll skip it
|
||||
t.Skip("Cannot easily test log.Fatalf without subprocess")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user