From 65a7ca4eafc9de5f1ee3e2eb624c2c8e6eec4061 Mon Sep 17 00:00:00 2001 From: Vsevolod Fedorov Date: Thu, 22 Feb 2024 12:53:51 +0300 Subject: [PATCH] Fix axis expansion error message Change-Id: Ic5cfe925b600521cd3e1893e0340b9848ac1d798 --- jenkins_jobs/dimensions.py | 2 +- .../error_fixtures/incorrect_template_dimensions.error | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins_jobs/dimensions.py b/jenkins_jobs/dimensions.py index 08425addb..3e67afcf3 100644 --- a/jenkins_jobs/dimensions.py +++ b/jenkins_jobs/dimensions.py @@ -38,7 +38,7 @@ def _decode_axis_value(axis, value, key_pos, value_pos): raise JenkinsJobsException( f"Expected a value or a dict with single element, but got: {item!r}", pos=value.value_pos[idx], - ctx=[Context(f"In pamareter {axis!r} definition", key_pos)], + ctx=[Context(f"In parameter {axis!r} definition", key_pos)], ) value, p = next(iter(item.items())) yield LocDict.merge( diff --git a/tests/yamlparser/error_fixtures/incorrect_template_dimensions.error b/tests/yamlparser/error_fixtures/incorrect_template_dimensions.error index df0c75ee1..a0090d27f 100644 --- a/tests/yamlparser/error_fixtures/incorrect_template_dimensions.error +++ b/tests/yamlparser/error_fixtures/incorrect_template_dimensions.error @@ -4,7 +4,7 @@ incorrect_template_dimensions.yaml:1:3: In project 'template_incorrect_args' incorrect_template_dimensions.yaml:14:3: In job template 'template-incorrect-args-{stream}-{os}' - job-template: ^ -incorrect_template_dimensions.yaml:6:5: In pamareter 'stream' definition +incorrect_template_dimensions.yaml:6:5: In parameter 'stream' definition stream: ^ incorrect_template_dimensions.yaml:7:9: Expected a value or a dict with single element, but got: {'current': None, 'branch': 'current'}