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

Add --skip-parameter-validation flag #72

Merged
merged 2 commits into from
Jul 23, 2019
Merged

Conversation

dprothero
Copy link
Contributor

@dprothero dprothero commented Jul 12, 2019

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I updated my branch with the master branch.
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation about the functionality in the appropriate .md file
  • I have added in line documentation to the code I modified

Contributing to Twilio

All third party contributors acknowledge that any contributions they provide will be made under the same open source license that the open source project is provided under.

Short description of what this PR does:

  • Adds a hidden --skip-parameter-validation flag to API commands
  • This aids our automated Tricorder testing since dummy parameter values don't always match the validation criteria

If you have questions, please file a support ticket, or create a Github Issue in this repository.

@codecov
Copy link

codecov bot commented Jul 12, 2019

Codecov Report

Merging #72 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #72   +/-   ##
======================================
  Coverage    98.8%   98.8%           
======================================
  Files          26      26           
  Lines         754     754           
======================================
  Hits          745     745           
  Misses          9       9
Impacted Files Coverage Δ
src/base-commands/twilio-api-command.js 97.82% <100%> (ø) ⬆️
src/services/twilio-api/api-command-runner.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ffbb086...58952dd. Read the comment docs.

@@ -44,7 +44,7 @@ class ApiCommandRunner {

// If there were any errors validating the flag values, log them by flag
// key and throw.
if (Object.keys(flagErrors).length > 0) {
if (Object.keys(flagErrors).length > 0 && !this.flagValues['skip-parameter-validation']) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it beneficial to log the errors but not throw?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was on vacation @childish-sambino ... it wouldn't be beneficial for the tricorder use-case.

@dprothero dprothero merged commit 34a4d2c into master Jul 23, 2019
@dprothero dprothero deleted the skip-validation-flag branch July 23, 2019 20:25
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.

None yet

3 participants