@@ -55,13 +55,14 @@ func test_NewUserEntry(t *testing.T) {
5555 VaultId : testVaultId ,
5656 Name : "TestGoDvlsAccessCode" ,
5757 Path : "go-dvls\\ accesscode" ,
58- Description : "Test AccessCode entry" ,
5958 Type : EntryCredentialType ,
6059 SubType : EntryCredentialSubTypeAccessCode ,
60+ Description : "Test AccessCode entry" ,
61+ Tags : []string {"accesscode" },
62+
6163 Data : EntryCredentialAccessCodeData {
6264 Password : "abc-123" ,
6365 },
64- Tags : []string {"accesscode" },
6566 }
6667
6768 newCredentialAccessCodeEntryId , err := testClient .Entries .Credential .New (testCredentialAccessCodeEntry )
@@ -81,15 +82,16 @@ func test_NewUserEntry(t *testing.T) {
8182 VaultId : testVaultId ,
8283 Name : "TestGoDvlsApiKey" ,
8384 Path : "go-dvls\\ apikey" ,
84- Description : "Test ApiKey entry" ,
8585 Type : EntryCredentialType ,
8686 SubType : EntryCredentialSubTypeApiKey ,
87+ Description : "Test ApiKey entry" ,
88+ Tags : []string {"apikey" },
89+
8790 Data : EntryCredentialApiKeyData {
8891 ApiId : "abcd1234-abcd-1234-abcd-1234abcd1234" ,
8992 ApiKey : "123-abc" ,
9093 TenantId : "00000000-aaaa-bbbb-cccc-000000000000" ,
9194 },
92- Tags : []string {"apikey" },
9395 }
9496
9597 newCredentialApiKeyEntryId , err := testClient .Entries .Credential .New (testCredentialApiKeyEntry )
@@ -109,15 +111,16 @@ func test_NewUserEntry(t *testing.T) {
109111 VaultId : testVaultId ,
110112 Name : "TestGoDvlsAzureServicePrincipal" ,
111113 Path : "go-dvls\\ azureserviceprincipal" ,
112- Description : "Test AzureServicePrincipal entry" ,
113114 Type : EntryCredentialType ,
114115 SubType : EntryCredentialSubTypeAzureServicePrincipal ,
116+ Description : "Test AzureServicePrincipal entry" ,
117+ Tags : []string {"azureserviceprincipal" },
118+
115119 Data : EntryCredentialAzureServicePrincipalData {
116120 ClientId : "abcd1234-abcd-1234-abcd-1234abcd1234" ,
117121 ClientSecret : "123-abc" ,
118122 TenantId : "00000000-aaaa-bbbb-cccc-000000000000" ,
119123 },
120- Tags : []string {"azureserviceprincipal" },
121124 }
122125
123126 newCredentialAzureServicePrincipalEntryId , err := testClient .Entries .Credential .New (testCredentialAzureServicePrincipalEntry )
@@ -137,13 +140,14 @@ func test_NewUserEntry(t *testing.T) {
137140 VaultId : testVaultId ,
138141 Name : "TestGoDvlsConnectionString" ,
139142 Path : "go-dvls\\ connectionstring" ,
140- Description : "Test ConnectionString entry" ,
141143 Type : EntryCredentialType ,
142144 SubType : EntryCredentialSubTypeConnectionString ,
145+ Description : "Test ConnectionString entry" ,
146+ Tags : []string {"connectionstring" },
147+
143148 Data : EntryCredentialConnectionStringData {
144149 ConnectionString : "Server=tcp:example.database.windows.net,1433;Initial Catalog=exampledb;Persist Security Info=False;User ID=exampleuser;Password=examplepassword;" ,
145150 },
146- Tags : []string {"connectionstring" },
147151 }
148152
149153 newCredentialConnectionStringEntryId , err := testClient .Entries .Credential .New (testCredentialConnectionStringEntry )
@@ -162,15 +166,16 @@ func test_NewUserEntry(t *testing.T) {
162166 VaultId : testVaultId ,
163167 Name : "TestGoDvlsUsernamePassword" ,
164168 Path : "go-dvls\\ usernamepassword" ,
165- Description : "Test Username/Password entry" ,
166169 Type : EntryCredentialType ,
167170 SubType : EntryCredentialSubTypeDefault ,
171+ Description : "Test Username/Password entry" ,
172+ Tags : []string {"usernamepassword" },
173+
168174 Data : EntryCredentialDefaultData {
169175 Domain : "www.example.com" ,
170176 Password : "abc-123" ,
171177 Username : "john.doe" ,
172178 },
173- Tags : []string {"usernamepassword" },
174179 }
175180
176181 newCredentialDefaultEntryId , err := testClient .Entries .Credential .New (testCredentialDefaultEntry )
@@ -190,16 +195,17 @@ func test_NewUserEntry(t *testing.T) {
190195 VaultId : testVaultId ,
191196 Name : "TestGoDvlsPrivateKey" ,
192197 Path : "go-dvls\\ privatekey" ,
193- Description : "Test Secret entry" ,
194198 Type : EntryCredentialType ,
195199 SubType : EntryCredentialSubTypePrivateKey ,
200+ Description : "Test Secret entry" ,
201+ Tags : []string {"testtag" },
202+
196203 Data : EntryCredentialPrivateKeyData {
197204 PrivateKey : "-----BEGIN PRIVATE KEY-----\a bcdefghijklmnopqrstuvwxyz1234567890...\n -----END PRIVATE" ,
198205 PublicKey : "-----BEGIN PUBLIC KEY-----\a bcdefghijklmnopqrstuvwxyz...\n -----END PUBLIC KEY-----" ,
199206 OverridePassword : "override-password" ,
200207 Passphrase : "passphrase" ,
201208 },
202- Tags : []string {"testtag" },
203209 }
204210
205211 newCredentialPrivateKeyEntryId , err := testClient .Entries .Credential .New (testCredentialPrivateKeyEntry )
0 commit comments