chore: upgrade dependencies (#2589)
* chore: upgrade dependencies * fix: linter errors * chore: bump version of golangci-lint * chore: go mod tidy * fix: failing test * fix: update version of upload-artifact to v4 * chore: format test output with gotestfmt * fix: typo in test exec * fix: failing tests * fix: windows unit test execution * fix: windows unit test execution * fix: whitespace
This commit is contained in:
@@ -17,11 +17,11 @@ func TestSetRef(t *testing.T) {
|
||||
defer func() { findGitRef = oldFindGitRef }()
|
||||
defer func() { findGitRevision = oldFindGitRevision }()
|
||||
|
||||
findGitRef = func(ctx context.Context, file string) (string, error) {
|
||||
findGitRef = func(_ context.Context, _ string) (string, error) {
|
||||
return "refs/heads/master", nil
|
||||
}
|
||||
|
||||
findGitRevision = func(ctx context.Context, file string) (string, string, error) {
|
||||
findGitRevision = func(_ context.Context, _ string) (string, string, error) {
|
||||
return "", "1234fakesha", nil
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ func TestSetRef(t *testing.T) {
|
||||
}
|
||||
|
||||
t.Run("no-default-branch", func(t *testing.T) {
|
||||
findGitRef = func(ctx context.Context, file string) (string, error) {
|
||||
findGitRef = func(_ context.Context, _ string) (string, error) {
|
||||
return "", fmt.Errorf("no default branch")
|
||||
}
|
||||
|
||||
@@ -131,11 +131,11 @@ func TestSetSha(t *testing.T) {
|
||||
defer func() { findGitRef = oldFindGitRef }()
|
||||
defer func() { findGitRevision = oldFindGitRevision }()
|
||||
|
||||
findGitRef = func(ctx context.Context, file string) (string, error) {
|
||||
findGitRef = func(_ context.Context, _ string) (string, error) {
|
||||
return "refs/heads/master", nil
|
||||
}
|
||||
|
||||
findGitRevision = func(ctx context.Context, file string) (string, string, error) {
|
||||
findGitRevision = func(_ context.Context, _ string) (string, string, error) {
|
||||
return "", "1234fakesha", nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user