Skip to content

Commit

Permalink
Fix name of client_version parameter in build JSON
Browse files Browse the repository at this point in the history
The client version should be in snake_case instead of kebab-case. The
atomic-reactor object which handles the build JSON will ignore
client_version but warn about client-version:
unprocessed keyword arguments: {u'client-version': ...}

Signed-off-by: Tim Waugh <twaugh@redhat.com>
  • Loading branch information
twaugh committed Feb 8, 2017
1 parent 17f22e1 commit ae95ffe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion inputs/prod_inner.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"client-version": "{{VERSION}}",
"client_version": "{{VERSION}}",
"prebuild_plugins": [
{
"args": {
Expand Down
2 changes: 1 addition & 1 deletion osbs/build/build_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ def render_customizations(self):
logger.debug("Invalid custom configuration found for enable_plugins")

def render_version(self):
self.dj.dock_json_set_param('client-version', client_version)
self.dj.dock_json_set_param('client_version', client_version)

def render(self, validate=True):
if validate:
Expand Down
4 changes: 2 additions & 2 deletions tests/build/test_build_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -1515,8 +1515,8 @@ def test_render_prod_custom_site_plugin_override(self):
def test_has_version(self):
br = BuildRequest(INPUTS_PATH)
br.render()
assert 'client-version' in br.dj.dock_json
assert 'client_version' in br.dj.dock_json

actual_version = br.dj.dock_json['client-version']
actual_version = br.dj.dock_json['client_version']
assert isinstance(actual_version, six.string_types)
assert expected_version == actual_version

0 comments on commit ae95ffe

Please sign in to comment.