Skip to content

Commit

Permalink
Fix Cloudstack Etcd encryption test (#6807)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavmpandey08 authored Oct 12, 2023
1 parent 04fe832 commit 5440fe6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/test/e2e/etcdEncryption.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (e *E2ESession) setupEtcdEncryption(testRegex string) error {
return fmt.Errorf("decoding ssh key: %v", err)
}

command := fmt.Sprintf("sudo cat <<EOF>> /%s\n%s\nEOF", e2etests.SSHKeyPath, string(decodedKey))
command := fmt.Sprintf("sudo cat <<EOF>> %s\n%s\nEOF", e2etests.SSHKeyPath, string(decodedKey))
if err := ssm.Run(e.session, logr.Discard(), e.instanceId, command, ssmTimeout); err != nil {
return fmt.Errorf("mounting ssh key in instance: %v", err)
}
Expand Down
5 changes: 4 additions & 1 deletion test/framework/etcdencryption.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"os"
"strings"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
jose "github.com/go-jose/go-jose/v3"
v1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -164,7 +165,9 @@ func (e *ClusterE2ETest) ValidateEtcdEncryption() {
func (e *ClusterE2ETest) PostClusterCreateEtcdEncryptionSetup() {
ctx := context.Background()
envVars := getEtcdEncryptionVarsFromEnv()
awsSession, err := session.NewSession()
awsSession, err := session.NewSession(&aws.Config{
Region: aws.String(defaultRegion),
})
if err != nil {
e.T.Fatalf("creating aws session for tests: %v", err)
}
Expand Down

0 comments on commit 5440fe6

Please sign in to comment.