Skip to content

Commit 0509869

Browse files
fix test
1 parent dfbe68a commit 0509869

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

remediation/workflow/metadata/actionmetadata_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,13 @@ func TestKnowledgeBase(t *testing.T) {
181181

182182
func doesActionRepoExist(filePath string) bool {
183183
splitOnSlash := strings.Split(filePath, "/")
184+
185+
// Check if path has enough components
186+
if len(splitOnSlash) < 6 {
187+
log.Printf("error in doesActionRepoExist: invalid path format %s", filePath)
188+
return false
189+
}
190+
184191
owner := splitOnSlash[5]
185192
repo := splitOnSlash[6]
186193

0 commit comments

Comments
 (0)