From de86b2c130d0325b61859e22aff9f89743dee459 Mon Sep 17 00:00:00 2001 From: Vsevolod Fedorov Date: Thu, 16 Feb 2023 11:52:34 +0300 Subject: [PATCH] Tests: Add test for defaults defined at project Change-Id: I0cafdd1b97625ef8a49d04f59c92d12694eb90d2 --- .../job_fixtures/project_defaults.xml | 20 +++++++++++++++++++ .../job_fixtures/project_defaults.yaml | 17 ++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 tests/yamlparser/job_fixtures/project_defaults.xml create mode 100644 tests/yamlparser/job_fixtures/project_defaults.yaml diff --git a/tests/yamlparser/job_fixtures/project_defaults.xml b/tests/yamlparser/job_fixtures/project_defaults.xml new file mode 100644 index 000000000..4574b74c5 --- /dev/null +++ b/tests/yamlparser/job_fixtures/project_defaults.xml @@ -0,0 +1,20 @@ + + + + <!-- Managed by Jenkins Job Builder --> + false + false + false + false + true + + + + + echo var=var-value + + + + + + diff --git a/tests/yamlparser/job_fixtures/project_defaults.yaml b/tests/yamlparser/job_fixtures/project_defaults.yaml new file mode 100644 index 000000000..1f15d4979 --- /dev/null +++ b/tests/yamlparser/job_fixtures/project_defaults.yaml @@ -0,0 +1,17 @@ +# Defaults defined at project should be honored. + +- defaults: + name: custom-defaults + var: var-value + +- job-template: + name: sample-job + builders: + - shell: | + echo var={var} + +- project: + name: sample-project + defaults: custom-defaults + jobs: + - sample-job