This repository was archived by the owner on Feb 16, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ import (
1212
1313func TestSecretsDirEnv (t * testing.T ) {
1414 const dirPath = "namespace/repo"
15- testUUID1 := uuid .New ()
16- testUUID2 := uuid .New ()
17- testUUID3 := uuid .New ()
18- testUUID4 := uuid .New ()
15+ rootDirUUID := uuid .New ()
16+ subDirUUID := uuid .New ()
17+ secretUUID1 := uuid .New ()
18+ secretUUID2 := uuid .New ()
1919
2020 cases := map [string ]struct {
2121 newClient newClientFunc
@@ -30,13 +30,13 @@ func TestSecretsDirEnv(t *testing.T) {
3030 return & api.Tree {
3131 ParentPath : "namespace" ,
3232 RootDir : & api.Dir {
33- DirID : testUUID1 ,
33+ DirID : rootDirUUID ,
3434 Name : "repo" ,
3535 },
3636 Secrets : map [uuid.UUID ]* api.Secret {
37- testUUID2 : {
38- SecretID : testUUID2 ,
39- DirID : testUUID1 ,
37+ secretUUID1 : {
38+ SecretID : secretUUID1 ,
39+ DirID : rootDirUUID ,
4040 Name : "foo" ,
4141 },
4242 },
@@ -55,20 +55,20 @@ func TestSecretsDirEnv(t *testing.T) {
5555 return & api.Tree {
5656 ParentPath : "namespace" ,
5757 RootDir : & api.Dir {
58- DirID : testUUID1 ,
58+ DirID : rootDirUUID ,
5959 Name : "repo" ,
6060 },
6161 Dirs : map [uuid.UUID ]* api.Dir {
62- testUUID2 : {
63- DirID : testUUID2 ,
64- ParentID : & testUUID1 ,
62+ subDirUUID : {
63+ DirID : subDirUUID ,
64+ ParentID : & rootDirUUID ,
6565 Name : "foo" ,
6666 },
6767 },
6868 Secrets : map [uuid.UUID ]* api.Secret {
69- testUUID3 : {
70- SecretID : testUUID3 ,
71- DirID : testUUID2 ,
69+ secretUUID1 : {
70+ SecretID : secretUUID1 ,
71+ DirID : subDirUUID ,
7272 Name : "bar" ,
7373 },
7474 },
@@ -87,25 +87,25 @@ func TestSecretsDirEnv(t *testing.T) {
8787 return & api.Tree {
8888 ParentPath : "namespace" ,
8989 RootDir : & api.Dir {
90- DirID : testUUID1 ,
90+ DirID : rootDirUUID ,
9191 Name : "repo" ,
9292 },
9393 Dirs : map [uuid.UUID ]* api.Dir {
94- testUUID2 : {
95- DirID : testUUID2 ,
96- ParentID : & testUUID1 ,
94+ subDirUUID : {
95+ DirID : subDirUUID ,
96+ ParentID : & rootDirUUID ,
9797 Name : "foo" ,
9898 },
9999 },
100100 Secrets : map [uuid.UUID ]* api.Secret {
101- testUUID3 : {
102- SecretID : testUUID3 ,
103- DirID : testUUID2 ,
101+ secretUUID1 : {
102+ SecretID : secretUUID1 ,
103+ DirID : subDirUUID ,
104104 Name : "bar" ,
105105 },
106- testUUID4 : {
107- SecretID : testUUID4 ,
108- DirID : testUUID1 ,
106+ secretUUID2 : {
107+ SecretID : secretUUID2 ,
108+ DirID : rootDirUUID ,
109109 Name : "foo_bar" ,
110110 },
111111 },
You can’t perform that action at this time.
0 commit comments