Skip to content

Commit c052f54

Browse files
committed
fix tests
1 parent 0acc340 commit c052f54

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

cli/docs/git/audit/help.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package audit
2+
3+
// import "github.com/jfrog/jfrog-cli-core/v2/plugins/components"
4+
5+
func GetDescription() string {
6+
return "Audit your local git repository project for security issues."
7+
}
8+
9+
// func GetArguments() []components.Argument {
10+
// return []components.Argument{{Name: "curl command", Description: "cURL command to run."}}
11+
// }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package git
1+
package contributors
22

33
func GetContContributorsDescription() string {
44
return "List all GIT providers' contributing developers."

cli/gitcommands.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import (
55
"github.com/jfrog/jfrog-cli-core/v2/common/progressbar"
66
"github.com/jfrog/jfrog-cli-core/v2/plugins/components"
77
flags "github.com/jfrog/jfrog-cli-security/cli/docs"
8-
gitDocs "github.com/jfrog/jfrog-cli-security/cli/docs/git"
8+
gitContributorsDocs "github.com/jfrog/jfrog-cli-security/cli/docs/git/contributors"
9+
gitAuditDocs "github.com/jfrog/jfrog-cli-security/cli/docs/git/audit"
910
"github.com/jfrog/jfrog-cli-security/commands/git/contributors"
1011
"github.com/jfrog/jfrog-client-go/utils/errorutils"
1112
"os"
@@ -14,11 +15,17 @@ import (
1415

1516
func getGitNameSpaceCommands() []components.Command {
1617
return []components.Command{
18+
{
19+
Name: "audit",
20+
Aliases: []string{"a"},
21+
Description: gitAuditDocs.GetDescription(),
22+
Flags: flags.GetCommandFlags(flags.GitAudit),
23+
},
1724
{
1825
Name: "count-contributors",
1926
Aliases: []string{"cc"},
2027
Flags: flags.GetCommandFlags(flags.GitCountContributors),
21-
Description: gitDocs.GetContContributorsDescription(),
28+
Description: gitContributorsDocs.GetContContributorsDescription(),
2229
Hidden: true,
2330
Action: GitCountContributorsCmd,
2431
},

commands/git/contributors/countcontributors_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func getCommitsListForTest(t *testing.T) []vcsclient.CommitInfo {
3333
}
3434

3535
func GetTestDataPath() string {
36-
return filepath.Join("..", "..", "tests", "testdata", "git")
36+
return filepath.Join("..", "..", "..", "tests", "testdata", "git")
3737
}
3838

3939
func TestCountContributorsCommand_saveCommitsInfoInMaps_OneRepo(t *testing.T) {

0 commit comments

Comments
 (0)