mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 12:14:22 +01:00
some barebones tests
This commit is contained in:
1 parent
0d75136c1c
commit
25736d115f
3 files changed
+3
-4
No files matched your search
+2
-2
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
func TestCheckRegex(t *testing.T) {
|
||||
var results []Leak
|
||||
opts := &Options{
|
||||
opts = &Options{
|
||||
Concurrency: 10,
|
||||
B64EntropyCutoff: 70,
|
||||
HexEntropyCutoff: 40,
|
||||
@@ -22,7 +22,7 @@ func TestCheckRegex(t *testing.T) {
|
||||
}
|
||||
|
||||
for k, v := range checks {
|
||||
results = doChecks(k, commit, opts, repo)
|
||||
results = doChecks(k, commit, &repo)
|
||||
if v != len(results) {
|
||||
t.Errorf("regexCheck failed on string %s", k)
|
||||
}
|
||||
|
||||
+1
-1
@@ -317,6 +317,6 @@ func (opts *Options) setupLogger() {
|
||||
|
||||
// isGithubTarget checks if url is a valid github target
|
||||
func isGithubTarget(url string) bool {
|
||||
re := regexp.MustCompile("github\\.com\\/")
|
||||
re := regexp.MustCompile("github.com")
|
||||
return re.MatchString(url)
|
||||
}
|
||||
Reference in new issue
Block a user