Skip to content

Commit

Permalink
fix mock input data
Browse files Browse the repository at this point in the history
  • Loading branch information
pr8kerl committed Apr 30, 2020
1 parent 871c521 commit 74c6cb9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version: '3.4'

x-base: &base
image: pr8kerl/gobuilder:1.12.1
image: pr8kerl/gobuilder:1.14
volumes:
- "$HOME/.kube:/root/.kube"
- "~/.aws:/root/.aws"
Expand Down
6 changes: 3 additions & 3 deletions pkg/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type CommandOptions struct {
ssm *ssm.Client
k8s *k8s.K8sClient
overwrite bool
advanced bool
advanced bool
encode bool
toEnvironment bool
tls bool
Expand Down Expand Up @@ -68,7 +68,7 @@ func NewCommandOptions() *CommandOptions {
ssm: svc,
k8s: kclient,
overwrite: false,
advanced: false,
advanced: false,
encode: false,
toEnvironment: false,
tls: false,
Expand Down Expand Up @@ -97,7 +97,7 @@ func init() {
exportCmd.Flags().StringVarP(&cli.ssmPath, "ssm-path", "s", cli.ssmPath, "ssm parameter store path to write data to")
exportCmd.MarkFlagRequired("ssm-path")
exportCmd.Flags().BoolVarP(&cli.overwrite, "overwrite", "o", cli.overwrite, "if parameter store key exists, overwite its values with those from k8s secret")
exportCmd.Flags().BoolVarP(&cli.advanced, "advanced", "o", cli.advanced, "if the secret size is over 4 KB but less than 8 KB, export it to an advanced parameter")
exportCmd.Flags().BoolVarP(&cli.advanced, "advanced", "a", cli.advanced, "if the secret size is over 4 KB but less than 8 KB, export it to an advanced parameter")
exportCmd.Flags().BoolVarP(&cli.encode, "encode", "e", cli.encode, "gzip, base64 encode values in parameter store")
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/ssm/ssm.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (c *Client) PutSecrets(parampath string, secrets map[string]string, overwri
Type: aws.String("SecureString"),
Value: aws.String(v),
Overwrite: aws.Bool(overwrite),
Tier: aws.String(tier)
Tier: aws.String(tier),
}
resp, err := c.PutParameter(pinput)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/ssm/ssm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package ssm

import (
"os"
"strings"
"testing"
"time"
"strings"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/ssm"
Expand Down Expand Up @@ -156,7 +156,7 @@ func TestSsmPutSecrets(t *testing.T) {

mockSecrets = map[string]string{
"passwd": "SuperSecretSquirrelPassword",
"token": []string{strings.Repeat("*", 4100)}
"token": strings.Repeat("*", 4100),
}
t.Run("test PutSecrets with secret size over 4 kb", func(t *testing.T) {
err := mockssm.PutSecrets("/foo", mockSecrets, false, true)
Expand Down

0 comments on commit 74c6cb9

Please sign in to comment.