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

Fix error message when no private key is provided #40

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

seveas
Copy link

@seveas seveas commented Oct 22, 2021

Short description

This error had me confused for a minute. Had to read this file to realize that I passed an empty string as PrivateKeyPath

Checklist

  • I read the CONTRIBUTING.md document
  • This code actually compiles
  • This code solves my problem
  • I've updated the inline documentation
  • I added or modified test(s) to prevent this issue from ever occuring again

Last 2 are not really applicable 😃

This error had me confused for a minute. Had to read this file to realize that I passed an empty string as PrivateKeyPath
@dionbosschieter
Copy link
Collaborator

Hi @seveas,

This will make the test expecting that error also fail. Could you also change that test?

--- FAIL: TestNewClient (0.00s)
    client_test.go:48: 
                Error Trace:    client_test.go:48
                Error:          Error message not equal:
                                expected: "PrivateKeyReader, token or PrivateKeyReader is required"
                                actual  : "PrivateKeyPath, token or PrivateKeyReader is required"
                Test:           TestNewClient
FAIL

@seveas
Copy link
Author

seveas commented Nov 11, 2021

Certainly! Apologies for the sloppy pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants