@@ -5,7 +5,6 @@ package integration
55import (
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
4229func TestHooksPreCommitUpdatePreCommitHook (t * testing.T ) {
0 commit comments