@@ -150,8 +150,7 @@ func TestCreateApplication(t *testing.T) {
150150 },
151151 checkApp : func (t * testing.T , cmd applicationCmd , app * apps.Application ) {
152152 is := require .New (t )
153- auth := gitinfo.Auth {Username : cmd .Git .Username , Password : cmd .Git .Password }
154- authSecret := auth .Secret (app )
153+ authSecret := gitinfo .NewAuthSecret (app )
155154 if err := apiClient .Get (t .Context (), api .ObjectName (authSecret ), authSecret ); err != nil {
156155 t .Fatal (err )
157156 }
@@ -176,8 +175,7 @@ func TestCreateApplication(t *testing.T) {
176175 },
177176 checkApp : func (t * testing.T , cmd applicationCmd , app * apps.Application ) {
178177 is := require .New (t )
179- auth := gitinfo.Auth {SSHPrivateKey : cmd .Git .SSHPrivateKey }
180- authSecret := auth .Secret (app )
178+ authSecret := gitinfo .NewAuthSecret (app )
181179 if err := apiClient .Get (t .Context (), api .ObjectName (authSecret ), authSecret ); err != nil {
182180 t .Fatal (err )
183181 }
@@ -201,8 +199,7 @@ func TestCreateApplication(t *testing.T) {
201199 },
202200 checkApp : func (t * testing.T , cmd applicationCmd , app * apps.Application ) {
203201 is := require .New (t )
204- auth := gitinfo.Auth {SSHPrivateKey : cmd .Git .SSHPrivateKey }
205- authSecret := auth .Secret (app )
202+ authSecret := gitinfo .NewAuthSecret (app )
206203 if err := apiClient .Get (t .Context (), api .ObjectName (authSecret ), authSecret ); err != nil {
207204 t .Fatal (err )
208205 }
@@ -226,8 +223,7 @@ func TestCreateApplication(t *testing.T) {
226223 },
227224 checkApp : func (t * testing.T , cmd applicationCmd , app * apps.Application ) {
228225 is := require .New (t )
229- auth := gitinfo.Auth {SSHPrivateKey : ptr .To ("notused" )}
230- authSecret := auth .Secret (app )
226+ authSecret := gitinfo .NewAuthSecret (app )
231227 if err := apiClient .Get (t .Context (), api .ObjectName (authSecret ), authSecret ); err != nil {
232228 t .Fatal (err )
233229 }
@@ -251,8 +247,7 @@ func TestCreateApplication(t *testing.T) {
251247 },
252248 checkApp : func (t * testing.T , cmd applicationCmd , app * apps.Application ) {
253249 is := require .New (t )
254- auth := gitinfo.Auth {SSHPrivateKey : ptr .To ("notused" )}
255- authSecret := auth .Secret (app )
250+ authSecret := gitinfo .NewAuthSecret (app )
256251 if err := apiClient .Get (t .Context (), api .ObjectName (authSecret ), authSecret ); err != nil {
257252 t .Fatal (err )
258253 }
0 commit comments