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

adding simple validation checks to reggie client #29

Merged
merged 2 commits into from
Oct 27, 2020

Conversation

vsoch
Copy link
Contributor

@vsoch vsoch commented Oct 19, 2020

This will add basic checks to validate the client config, along with brief notes for development in the README to close #24. We discussed checking for an empty UserAgent, but it looks like this isn't possible (at least when called in the NewClient function). I tried various tricks to instantiate the client for the test and then change the UserAgent to an empty string, but always got memory / reference errors. So if it's not possible, we might just remove it. If it's possible, I'd want to know how and then adjust the test.

Signed-off-by: vsoch vsochat@stanford.edu

Signed-off-by: vsoch <vsochat@stanford.edu>
Signed-off-by: vsoch <vsochat@stanford.edu>
@vsoch
Copy link
Contributor Author

vsoch commented Oct 19, 2020

We could probably just validate the Address with just the second check (the urlvalidator and skip the check for an empty string) but giving a message about the empty string vs. just an invalid URL seems more meaningful to the user.

Copy link
Contributor

@jdolitsky jdolitsky left a comment

Choose a reason for hiding this comment

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

awesome, thank you @vsoch !

@jdolitsky jdolitsky merged commit 6618ff1 into bloodorangeio:master Oct 27, 2020
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.

Discussion for validation of config
2 participants