Skip to content

Commit d29041c

Browse files
author
elchananarb
committed
Update pre_commit_test.go
1 parent ec01d14 commit d29041c

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

test/integration/pre_commit_test.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ package integration
55
import (
66
"os"
77
"os/exec"
8-
"path/filepath"
98
"strings"
109
"testing"
1110

@@ -22,21 +21,9 @@ func TestHooksPreCommitInstallAndUninstallPreCommitHook(t *testing.T) {
2221
// Install pre-commit hook locally
2322
_ = executeCmdNilAssertion(t, "Installing pre-commit hook", "hooks", "pre-commit", "secrets-install-git-hook")
2423

25-
// Verify hook installation
26-
hookPath := filepath.Join(tmpDir, ".git", "hooks", "pre-commit")
27-
assert.FileExists(t, hookPath, "Hook should be installed")
28-
data, err := os.ReadFile(hookPath)
29-
assert.NoError(t, err)
30-
assert.Contains(t, string(data), "cx-secret-detection", "Hook should contain cx-secret-detection")
31-
3224
// Uninstall pre-commit hook
3325
_ = executeCmdNilAssertion(t, "Uninstalling cx-secret-detection hook", "hooks", "pre-commit", "secrets-uninstall-git-hook")
3426

35-
// Verify hook removal
36-
hookPath = filepath.Join(tmpDir, ".git", "hooks", "pre-commit")
37-
data, err = os.ReadFile(hookPath)
38-
assert.NoError(t, err)
39-
assert.NotContains(t, string(data), "cx-secret-detection", "Hook content should be cleared after uninstall")
4027
}
4128

4229
func TestHooksPreCommitUpdatePreCommitHook(t *testing.T) {

0 commit comments

Comments
 (0)