File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
pkg/asset/agent/gencrypto Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import (
1717
1818// AuthConfig is an asset that generates ECDSA public/private keys, JWT token.
1919type AuthConfig struct {
20- PublicKey , PrivateKey , Token string
20+ PublicKey , Token string
2121}
2222
2323var _ asset.Asset = (* AuthConfig )(nil )
@@ -49,10 +49,8 @@ func (a *AuthConfig) Generate(dependencies asset.Parents) error {
4949 return err
5050 }
5151 // Encode to Base64 (Standard encoding)
52- encodedPrivateKeyPEM := base64 .StdEncoding .EncodeToString ([]byte (PrivateKey ))
5352 encodedPubKeyPEM := base64 .StdEncoding .EncodeToString ([]byte (PublicKey ))
5453
55- a .PrivateKey = encodedPrivateKeyPEM
5654 a .PublicKey = encodedPubKeyPEM
5755
5856 token , err := localJWTForKey (infraEnvID .ID , PrivateKey )
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ func TestAuthConfig_Generate(t *testing.T) {
1414 name string
1515 }{
1616 {
17- name : "generate-public-private-keys " ,
17+ name : "generate-public-key-and-token " ,
1818 },
1919 }
2020 for _ , tc := range cases {
@@ -27,7 +27,6 @@ func TestAuthConfig_Generate(t *testing.T) {
2727
2828 assert .NoError (t , err )
2929
30- assert .NotEmpty (t , authConfigAsset .PrivateKey )
3130 assert .NotEmpty (t , authConfigAsset .PublicKey )
3231 assert .NotEmpty (t , authConfigAsset .Token )
3332 })
You can’t perform that action at this time.
0 commit comments