Skip to content

Conversation

honglu
Copy link
Contributor

@honglu honglu commented Mar 21, 2019

Description of changes:
Move methods that modify parameter values to a separate class

Checklist:

  • Write/update tests
  • make pr passes

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-io
Copy link

Codecov Report

Merging #862 into develop will decrease coverage by 0.02%.
The diff coverage is 95.23%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #862      +/-   ##
===========================================
- Coverage    94.68%   94.66%   -0.03%     
===========================================
  Files           67       69       +2     
  Lines         2975     2978       +3     
  Branches       547      547              
===========================================
+ Hits          2817     2819       +2     
- Misses          83       84       +1     
  Partials        75       75
Impacted Files Coverage Δ
samtranslator/public/sdk/parameter.py 0% <0%> (ø)
samtranslator/sdk/parameter.py 100% <100%> (ø)
samtranslator/translator/translator.py 98.96% <100%> (-0.13%) ⬇️

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 31d9d55...180d301. Read the comment docs.

@brettstack brettstack changed the title chore: move methods that modify parameter values to a separate class refactor: move methods that modify parameter values to a separate class Mar 21, 2019
sam_parameter_values.add_default_parameter_values(sam_template)
self.assertEqual(expected, sam_parameter_values.parameter_values)

def test_add_default_parameter_values_must_skip_params_without_defaults(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

This would fail CFN execution, right? All Params require a value. Can (should) we fail early? I like the idea of SAM failing faster than CFN when possible. Then again, it could be possible that a Plugin could fill in Params, but I can't think of a use-case. I'd like to get James and Keeton's feedback too.

param(None)
])
def test_add_default_parameter_values_must_ignore_invalid_template_parameters(self, template_parameters):
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, if they're invalid can we fail early?

@jlhood jlhood merged commit 3442906 into aws:develop Mar 22, 2019
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.

5 participants