Skip to content

Commit

Permalink
chore: Code format (argoproj#12400)
Browse files Browse the repository at this point in the history
Signed-off-by: fengshunli <1171313930@qq.com>
Signed-off-by: rahul-mourya <rahul.mourya2@ibm.com>
  • Loading branch information
fengshunli authored and rahul-mourya committed Jun 8, 2023
1 parent 9739470 commit 5ac0de7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/argocd/commands/bcrypt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func TestGeneratePassword(t *testing.T) {
bcryptCmd := NewBcryptCmd()
bcryptCmd.SetArgs([]string{"--password", "abc"})
output := new(bytes.Buffer)
bcryptCmd.SetOutput(output)
bcryptCmd.SetOut(output)
err := bcryptCmd.Execute()
if err != nil {
return
Expand Down
4 changes: 2 additions & 2 deletions cmd/argocd/commands/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
func TestShortVersionClient(t *testing.T) {
buf := new(bytes.Buffer)
cmd := NewVersionCmd(&argocdclient.ClientOptions{}, nil)
cmd.SetOutput(buf)
cmd.SetOut(buf)
cmd.SetArgs([]string{"version", "--short", "--client"})
err := cmd.Execute()
if err != nil {
Expand All @@ -26,7 +26,7 @@ func TestShortVersion(t *testing.T) {
serverVersion := &version.VersionMessage{Version: "v99.99.99+unknown"}
buf := new(bytes.Buffer)
cmd := NewVersionCmd(&argocdclient.ClientOptions{}, serverVersion)
cmd.SetOutput(buf)
cmd.SetOut(buf)
cmd.SetArgs([]string{"argocd", "version", "--short"})
err := cmd.Execute()
if err != nil {
Expand Down
8 changes: 4 additions & 4 deletions cmd/util/applicationset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/assert"
)

var appSet string = `apiVersion: argoproj.io/v1alpha1
var appSet = `apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: guestbook
Expand All @@ -31,10 +31,10 @@ spec:
`

func TestReadAppSet(t *testing.T) {
appsets := []*argoprojiov1alpha1.ApplicationSet{}
err := readAppset([]byte(appSet), &appsets)
var appSets []*argoprojiov1alpha1.ApplicationSet
err := readAppset([]byte(appSet), &appSets)
if err != nil {
t.Logf("Failed reading appset file")
}
assert.Equal(t, len(appsets), 1)
assert.Equal(t, len(appSets), 1)
}

0 comments on commit 5ac0de7

Please sign in to comment.