Skip to content

Commit

Permalink
Merge pull request #25 from reactiveops/ejether/fix-24
Browse files Browse the repository at this point in the history
fixing issue with set-string
  • Loading branch information
ejether authored Jan 2, 2019
2 parents d8fb038 + 02a5b17 commit 330b318
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.9.1]

### Fixed
- bug where string values were being set as `set-string`


## [0.9.0]

### Added
Expand Down
2 changes: 1 addition & 1 deletion reckoner/chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def install(self, namespace=None, context=None):

for key, value in self.values_strings.iteritems():
for k, v in self._format_set(key, value):
self.args.append("--set={}={}".format(k, v))
self.args.append("--set-string={}={}".format(k, v))

self.__check_env_vars()
try:
Expand Down
2 changes: 1 addition & 1 deletion reckoner/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = '0.9.0'
__version__ = '0.9.1'
__author__ = 'ReactiveOps, Inc.'
3 changes: 1 addition & 2 deletions tests/test_course.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ charts:
string: string
integer: 10
boolean: True
test_environ_var: ${test_environ_var}
centrifugo:
centrifugo:
repository:
git: https://github.com/kubernetes/charts.git
path: stable
Expand Down
16 changes: 15 additions & 1 deletion tests/test_reckoner.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ def test_chart_values(self):
elif chart.name == test_nested_values_chart:
self.assertEqual(chart.values, test_nested_values)
elif chart.release_name == test_values_strings_chart:
self.assertEqual(chart.values_strings, test_flat_values, )
self.assertIsInstance(chart.values_strings['string'], str)
self.assertIsInstance(chart.values_strings['integer'], int)
self.assertIsInstance(chart.values_strings['boolean'], bool)
Expand Down Expand Up @@ -360,6 +359,21 @@ def test_chart_install(self):
'--recreate-pods',
'--set={}={}'.format(test_environ_var_name, test_environ_var)]
)
if chart.release_name == test_values_strings_chart:
self.assertEqual(
last_mock,
[
'helm', 'upgrade', '--install',
chart.release_name,
chart.chart_path,
'--namespace={}'.format(chart.namespace),
'--recreate-pods',
'--version=0.1.0',
'--set-string=string=string',
'--set-string=integer=10',
'--set-string=boolean=True'
]
)


class TestRepository(TestBase):
Expand Down

0 comments on commit 330b318

Please sign in to comment.