Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests now use an external vault process #1230

Merged
merged 1 commit into from
Jul 23, 2019
Merged

tests now use an external vault process #1230

merged 1 commit into from
Jul 23, 2019

Conversation

eikenb
Copy link
Contributor

@eikenb eikenb commented Jul 16, 2019

Replace use of core vault package for testing with an external vault
process. Previously each set of tests that needed vault would create a
vault service in the test process and all tests would use the default
'secret' kv path. Now it uses a separate kv secrets path for each set of
tests, setting the version for each.

The code for starting up the Vault process was based off what was
already used for Consul via its sdk/testutils package.

In the process various test conflicts were addressed and an external
process (consul and vault) process leak was fixed [1].

[1] the leak was caused by use of log.Fatal which calls os.Exit which
exist the process without running any cleanup code.

@eikenb eikenb requested review from a team July 16, 2019 00:00
.circleci/config.yml Outdated Show resolved Hide resolved
@eikenb eikenb added this to the v0.20.1 milestone Jul 16, 2019
@eikenb eikenb added the vault Related to the Vault integration label Jul 16, 2019
@eikenb eikenb force-pushed the vault-test-server branch 4 times, most recently from 1169dea to 82d4870 Compare July 18, 2019 23:21
Copy link

@freddygv freddygv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good @eikenb, just have a couple minor questions/comments.

dependency/dependency_test.go Outdated Show resolved Hide resolved
dependency/dependency_test.go Show resolved Hide resolved
dependency/dependency_test.go Outdated Show resolved Hide resolved
dependency/dependency_test.go Show resolved Hide resolved
dependency/vault_read_test.go Outdated Show resolved Hide resolved
dependency/vault_list_test.go Outdated Show resolved Hide resolved
dependency/vault_read_test.go Outdated Show resolved Hide resolved
Copy link

@freddygv freddygv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Replace use of core vault package for testing with an external vault
process. Previously each set of tests that needed vault would create a
vault service in the test process and all tests would use the default
'secret' kv path. Now it uses a separate kv secrets path for each set of
tests, setting the version for each.

The code for starting up the Vault process was based off what was
already used for Consul via its sdk/testutils package.

In the process various test conflicts were addressed and an external
process (consul and vault) process leak was fixed [1].

[1] the leak was caused by use of log.Fatal which calls os.Exit which
exist the process without running any cleanup code.
@eikenb eikenb merged commit 06f2068 into master Jul 23, 2019
@eikenb eikenb deleted the vault-test-server branch July 23, 2019 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vault Related to the Vault integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants