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

Commit 42aaa37

Browse files
committed
Improve naming of UUIDs in run_test.go
1 parent dfa86e5 commit 42aaa37

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

internals/secrethub/run_test.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -659,8 +659,8 @@ func osStatFunc(name string, err error) func(string) (os.FileInfo, error) {
659659
}
660660

661661
func TestRunCommand_environment(t *testing.T) {
662-
testUUID1 := uuid.New()
663-
testUUID2 := uuid.New()
662+
rootDirUUID := uuid.New()
663+
secretUUID := uuid.New()
664664

665665
cases := map[string]struct {
666666
command RunCommand
@@ -779,13 +779,13 @@ func TestRunCommand_environment(t *testing.T) {
779779
return &api.Tree{
780780
ParentPath: "namespace",
781781
RootDir: &api.Dir{
782-
DirID: testUUID1,
782+
DirID: rootDirUUID,
783783
Name: "repo",
784784
},
785785
Secrets: map[uuid.UUID]*api.Secret{
786-
testUUID2: {
787-
SecretID: testUUID2,
788-
DirID: testUUID1,
786+
secretUUID: {
787+
SecretID: secretUUID,
788+
DirID: rootDirUUID,
789789
Name: "foo",
790790
},
791791
},
@@ -831,13 +831,13 @@ func TestRunCommand_environment(t *testing.T) {
831831
return &api.Tree{
832832
ParentPath: "namespace",
833833
RootDir: &api.Dir{
834-
DirID: testUUID1,
834+
DirID: rootDirUUID,
835835
Name: "repo",
836836
},
837837
Secrets: map[uuid.UUID]*api.Secret{
838-
testUUID2: {
839-
SecretID: testUUID2,
840-
DirID: testUUID1,
838+
secretUUID: {
839+
SecretID: secretUUID,
840+
DirID: rootDirUUID,
841841
Name: "foo",
842842
},
843843
},
@@ -881,13 +881,13 @@ func TestRunCommand_environment(t *testing.T) {
881881
return &api.Tree{
882882
ParentPath: "namespace",
883883
RootDir: &api.Dir{
884-
DirID: testUUID1,
884+
DirID: rootDirUUID,
885885
Name: "repo",
886886
},
887887
Secrets: map[uuid.UUID]*api.Secret{
888-
testUUID2: {
889-
SecretID: testUUID2,
890-
DirID: testUUID1,
888+
secretUUID: {
889+
SecretID: secretUUID,
890+
DirID: rootDirUUID,
891891
Name: "foo",
892892
},
893893
},

0 commit comments

Comments
 (0)