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

Make Test Fails #591

Closed
murphymj25 opened this issue Jan 15, 2019 · 5 comments
Closed

Make Test Fails #591

murphymj25 opened this issue Jan 15, 2019 · 5 comments
Assignees
Labels

Comments

@murphymj25
Copy link
Contributor

When i run a make test, i get the following failure:

=== RUN   TestGetCertificate
Issue: Put http://127.0.0.1:58421/v1/test-pki/issue/fabio: EOF
2019/01/15 12:56:03 [ERROR] cert: vault: Failed to re-issue cert for localhost: vault: issue: Put http://127.0.0.1:58421/v1/test-pki/issue/fabio: EOF
Issue: Put http://127.0.0.1:58421/v1/test-pki/issue/fabio: EOF
2019/01/15 12:56:03 [ERROR] cert: vault: Failed to re-issue cert for localhost: vault: issue: Put http://127.0.0.1:58421/v1/test-pki/issue/fabio: EOF
Issue: Put http://127.0.0.1:58421/v1/test-pki/issue/fabio: EOF
Issue: Put http://127.0.0.1:58421/v1/test-pki/issue/fabio: EOF
Issue: Put http://127.0.0.1:58421/v1/test-pki/issue/fabio: EOF
2019/01/15 12:56:03 [ERROR] cert: vault: Failed to re-issue cert for localhost: vault: issue: Put http://127.0.0.1:58421/v1/test-pki/issue/fabio: EOF
Issue: Put http://127.0.0.1:58421/v1/test-pki/issue/fabio: EOF
2019/01/15 12:56:03 [ERROR] cert: vault: Failed to re-issue cert for localhost: vault: issue: Put http://127.0.0.1:58421/v1/test-pki/issue/fabio: EOF
2019/01/15 12:56:03 [ERROR] cert: vault: Failed to re-issue cert for localhost: vault: issue: Put http://127.0.0.1:58421/v1/test-pki/issue/fabio: EOF
2019/01/15 12:56:03 [ERROR] cert: vault: Failed to re-issue cert for localhost: vault: issue: Put http://127.0.0.1:58421/v1/test-pki/issue/fabio: EOF
--- PASS: TestGetCertificate (0.04s)
FAIL
FAIL	github.com/fabiolb/fabio/cert	8.111s

Is there something i need to setup differently for this test to pass?

Thanks!

@pschultz
Copy link
Member

TestGetCertificate isn't failing:

--- PASS: TestGetCertificate (0.04s)

Look at the test output again, and find out which one is actually failing. Then run it by itself (with the -run flag), and paste the output here.

@murphymj25
Copy link
Contributor Author

murphymj25 commented Jan 16, 2019

Ah yes, i looked a little further and see the test that fails. It looks like it is "TestVaultSource". When i run the test manually, i get the following:

=== RUN   TestVaultSource
--- FAIL: TestVaultSource (3.30s)
    source_test.go:316: Starting vault: "Vault v0.9.1 ('87b6919dea55da61d7cd444b2442cabb8ede8ab1')\n"
    source_test.go:465: Vault: KV backend: V1
=== RUN   TestVaultSource/renewable_token
2019/01/16 15:46:34 [ERROR] cert: Cannot load certificates from secret/fabio/cert. vault: query mount path: Error making API request.

@pschultz
Copy link
Member

I can reproduce the failure with Vault 0.9.1 and will look into it.

Note that 0.9.1 is pretty old. The tests pass with 1.0.2.

@pschultz pschultz self-assigned this Jan 17, 2019
@pschultz pschultz added the bug label Jan 17, 2019
@pschultz
Copy link
Member

pschultz commented Jan 17, 2019

With #497 we essentially dropped support for Vault versions before 0.10.1, specifically because we rely on this change to figure out if the secret backend uses the K/V engine in version 1 or version 2:

  • Mount information visibility: Users that have access to any path within a mount can now see information about that mount, such as its type and options, via some API calls.

Given that 0.10.1 has been released in April 2018, and 1.0 has been released in December 2018, I'm not convinced that it's worth the effort of making this work. I suggest updating to a more recent Vault version instead.

If it's just about getting the tests to pass, you can set VAULT_EXE to specify which vault binary to use. You don't have to replace the system-wide installed vault, if any.

/cc @magiconair, @leprechau

@murphymj25
Copy link
Contributor Author

I updated my local vault to v1.0.2 and the tests now pass. Thanks everyone for the help!

Closing this issue.

@pschultz pschultz added wontfix and removed bug labels Jan 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants