Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 722cb64

Browse files
committed
Fix linter error
1 parent 42aaa37 commit 722cb64

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

internals/secrethub/run_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,8 @@ func TestRunCommand_environment(t *testing.T) {
662662
rootDirUUID := uuid.New()
663663
secretUUID := uuid.New()
664664

665+
const secretPathFoo = "namespace/repo/foo"
666+
665667
cases := map[string]struct {
666668
command RunCommand
667669
expectedEnv []string
@@ -806,7 +808,7 @@ func TestRunCommand_environment(t *testing.T) {
806808
SecretService: &fakeclient.SecretService{
807809
VersionService: &fakeclient.SecretVersionService{
808810
GetWithDataFunc: func(path string) (*api.SecretVersion, error) {
809-
if path == "namespace/repo/foo" {
811+
if path == secretPathFoo {
810812
return &api.SecretVersion{Data: []byte("aaa")}, nil
811813
} else if path == "other/secret/path" {
812814
return &api.SecretVersion{Data: []byte("bbb")}, nil
@@ -857,7 +859,7 @@ func TestRunCommand_environment(t *testing.T) {
857859
SecretService: &fakeclient.SecretService{
858860
VersionService: &fakeclient.SecretVersionService{
859861
GetWithDataFunc: func(path string) (*api.SecretVersion, error) {
860-
if path == "namespace/repo/foo" {
862+
if path == secretPathFoo {
861863
return &api.SecretVersion{Data: []byte("aaa")}, nil
862864
}
863865
return nil, api.ErrSecretNotFound
@@ -909,7 +911,7 @@ func TestRunCommand_environment(t *testing.T) {
909911
GetWithDataFunc: func(path string) (*api.SecretVersion, error) {
910912
if path == "test/test/test" {
911913
return &api.SecretVersion{Data: []byte("bbb")}, nil
912-
} else if path == "namespace/repo/foo" {
914+
} else if path == secretPathFoo {
913915
return &api.SecretVersion{Data: []byte("aaa")}, nil
914916
}
915917
return nil, api.ErrSecretNotFound

0 commit comments

Comments
 (0)