Skip to content

Commit

Permalink
Merge pull request #2 from developer-guy/azure-kms
Browse files Browse the repository at this point in the history
fix for e2e test, little improvement in bash script
  • Loading branch information
cpanato committed Jul 12, 2021
2 parents e529ce4 + e928851 commit 35b10d3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/signature/kms/kms.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
)

func init() {
ProvidersMux().AddProvider(hashivault.ReferenceScheme, func(ctx context.Context, keyResourceID string, hashFunc crypto.Hash) (SignerVerifier, error) {
ProvidersMux().AddProvider(azure.ReferenceScheme, func(ctx context.Context, keyResourceID string, hashFunc crypto.Hash) (SignerVerifier, error) {
return azure.LoadSignerVerifier(ctx, keyResourceID, hashFunc)
})
ProvidersMux().AddProvider(gcp.ReferenceScheme, func(ctx context.Context, keyResourceID string, _ crypto.Hash) (SignerVerifier, error) {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
vault:
image: vault:latest
environment:
VAULT_DEV_ROOT_TOKEN_ID: testtoken
VAULT_DEV_ROOT_TOKEN_ID: ${VAULT_TOKEN}
ports:
- 8200:8200
privileged: true
17 changes: 12 additions & 5 deletions test/e2e/e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,18 @@

set -ex

cleanup() {
echo "cleanup"
docker-compose down
}

trap cleanup ERR

export VAULT_TOKEN=testtoken
export VAULT_ADDR=http://localhost:8200/

echo "starting services"
docker-compose config
docker-compose up -d

count=0
Expand All @@ -39,10 +50,6 @@ sleep 5
echo
echo "running tests"

export VAULT_TOKEN=testtoken
export VAULT_ADDR=http://localhost:8200/

go test -tags e2e -count=1 ./...

echo "cleanup"
docker-compose down
cleanup

0 comments on commit 35b10d3

Please sign in to comment.