Skip to content

Commit 76abdf4

Browse files
delete test - we're not prioritizing generated config file
1 parent 5f8f58a commit 76abdf4

File tree

2 files changed

+1
-32
lines changed

2 files changed

+1
-32
lines changed

cmd/analyze_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func TestGetToolName(t *testing.T) {
7272
// PMD cases
7373
{"pmd v6", "pmd", "6.55.0", "PMD"},
7474
{"pmd v7", "pmd", "7.0.0", "PMD7"},
75-
{"pmd unknown version", "pmd", "8.0.0", "PMD"},
75+
{"pmd unknown version", "pmd", "8.0.0", "pmd"},
7676

7777
// Other tools should remain unchanged
7878
{"unknown tool", "bandit", "1.7.4", "bandit"},

tools/runnerUtils_test.go

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -61,37 +61,6 @@ func TestConfigFileExistsInRepositoryDirectory(t *testing.T) {
6161
"Config path should be correctly formed relative path")
6262
}
6363

64-
func TestConfigFilePrefersToolsConfigDirectory(t *testing.T) {
65-
// Create a test directory structure
66-
tempDir := t.TempDir()
67-
repoDir := filepath.Join(tempDir, "src")
68-
repositoryCache := filepath.Join(repoDir, ".codacy")
69-
70-
// Create configuration
71-
config := *config.NewConfigType(repoDir, repositoryCache, "unused-global-cache")
72-
73-
// Create .codacy/tools-configs directory
74-
configDir := filepath.Join(repoDir, ".codacy", "tools-configs")
75-
err := os.MkdirAll(configDir, 0755)
76-
assert.NoError(t, err, "Failed to create test directory structure")
77-
78-
// Create a test config file in both locations
79-
generatedConfigFile := filepath.Join(configDir, "some-config.yaml")
80-
existingConfigFile := filepath.Join(repoDir, "some-config.yaml")
81-
82-
err = os.WriteFile(generatedConfigFile, []byte("tools config content"), 0644)
83-
assert.NoError(t, err, "Failed to create test config file in tools config directory")
84-
85-
err = os.WriteFile(existingConfigFile, []byte("repository config content"), 0644)
86-
assert.NoError(t, err, "Failed to create test config file in repository directory")
87-
88-
// Test case: Config file in tools config directory is preferred
89-
configPath, exists := ConfigFileExists(config, "some-config.yaml")
90-
assert.True(t, exists, "Config file should exist")
91-
assert.Equal(t, filepath.Join(config.ToolsConfigDirectory(), "some-config.yaml"), configPath,
92-
"Config path should prefer tools config directory")
93-
}
94-
9564
func TestConfigFileDoesNotExist(t *testing.T) {
9665
// Create a test directory structure
9766
tempDir := t.TempDir()

0 commit comments

Comments
 (0)