From e27358111d96e12ffc0c32b01384be252eae3166 Mon Sep 17 00:00:00 2001 From: Vsevolod Fedorov Date: Wed, 13 Dec 2023 13:33:15 +0300 Subject: [PATCH] Add missing tests for some wrappers Test for timeout plugin version before 1.14. Test for obtaining timeout plugin version by plugin name "Build Timeout". Test for nodejs-installator plugin, with nodejs version specified. Change-Id: I87e304b5b45c957a36ae2a109a176bf70ae94136 --- ...-installator-specific-version.plugins_info.yaml | 2 ++ .../nodejs-installator-specific-version.xml | 8 ++++++++ .../nodejs-installator-specific-version.yaml | 3 +++ .../alternative-name.plugins_info.yaml | 3 +++ .../timeout/version-1.13/alternative-name.xml | 13 +++++++++++++ .../timeout/version-1.13/alternative-name.yaml | 3 +++ .../version-1.13/full-1.13.plugins_info.yaml | 3 +++ .../fixtures/timeout/version-1.13/full-1.13.xml | 14 ++++++++++++++ .../fixtures/timeout/version-1.13/full-1.13.yaml | 9 +++++++++ 9 files changed, 58 insertions(+) create mode 100644 tests/wrappers/fixtures/nodejs-installator-specific-version.plugins_info.yaml create mode 100644 tests/wrappers/fixtures/nodejs-installator-specific-version.xml create mode 100644 tests/wrappers/fixtures/nodejs-installator-specific-version.yaml create mode 100644 tests/wrappers/fixtures/timeout/version-1.13/alternative-name.plugins_info.yaml create mode 100644 tests/wrappers/fixtures/timeout/version-1.13/alternative-name.xml create mode 100644 tests/wrappers/fixtures/timeout/version-1.13/alternative-name.yaml create mode 100644 tests/wrappers/fixtures/timeout/version-1.13/full-1.13.plugins_info.yaml create mode 100644 tests/wrappers/fixtures/timeout/version-1.13/full-1.13.xml create mode 100644 tests/wrappers/fixtures/timeout/version-1.13/full-1.13.yaml diff --git a/tests/wrappers/fixtures/nodejs-installator-specific-version.plugins_info.yaml b/tests/wrappers/fixtures/nodejs-installator-specific-version.plugins_info.yaml new file mode 100644 index 000000000..9c8bb6bb5 --- /dev/null +++ b/tests/wrappers/fixtures/nodejs-installator-specific-version.plugins_info.yaml @@ -0,0 +1,2 @@ +- shortName: nodejs + version: '123' diff --git a/tests/wrappers/fixtures/nodejs-installator-specific-version.xml b/tests/wrappers/fixtures/nodejs-installator-specific-version.xml new file mode 100644 index 000000000..997cf3ccf --- /dev/null +++ b/tests/wrappers/fixtures/nodejs-installator-specific-version.xml @@ -0,0 +1,8 @@ + + + + + specific node + + + diff --git a/tests/wrappers/fixtures/nodejs-installator-specific-version.yaml b/tests/wrappers/fixtures/nodejs-installator-specific-version.yaml new file mode 100644 index 000000000..1edbfc3ca --- /dev/null +++ b/tests/wrappers/fixtures/nodejs-installator-specific-version.yaml @@ -0,0 +1,3 @@ +wrappers: + - nodejs-installator: + name: "specific node" diff --git a/tests/wrappers/fixtures/timeout/version-1.13/alternative-name.plugins_info.yaml b/tests/wrappers/fixtures/timeout/version-1.13/alternative-name.plugins_info.yaml new file mode 100644 index 000000000..fd392b9bb --- /dev/null +++ b/tests/wrappers/fixtures/timeout/version-1.13/alternative-name.plugins_info.yaml @@ -0,0 +1,3 @@ +# Check that another plugin long name is also checked. +- longName: "Build Timeout" + version: "1.13" diff --git a/tests/wrappers/fixtures/timeout/version-1.13/alternative-name.xml b/tests/wrappers/fixtures/timeout/version-1.13/alternative-name.xml new file mode 100644 index 000000000..7573e215b --- /dev/null +++ b/tests/wrappers/fixtures/timeout/version-1.13/alternative-name.xml @@ -0,0 +1,13 @@ + + + + + 10 + false + false + 0 + 3 + absolute + + + diff --git a/tests/wrappers/fixtures/timeout/version-1.13/alternative-name.yaml b/tests/wrappers/fixtures/timeout/version-1.13/alternative-name.yaml new file mode 100644 index 000000000..ab3e7f5ed --- /dev/null +++ b/tests/wrappers/fixtures/timeout/version-1.13/alternative-name.yaml @@ -0,0 +1,3 @@ +wrappers: +- timeout: + timeout: 10 diff --git a/tests/wrappers/fixtures/timeout/version-1.13/full-1.13.plugins_info.yaml b/tests/wrappers/fixtures/timeout/version-1.13/full-1.13.plugins_info.yaml new file mode 100644 index 000000000..e27fdeef4 --- /dev/null +++ b/tests/wrappers/fixtures/timeout/version-1.13/full-1.13.plugins_info.yaml @@ -0,0 +1,3 @@ +- longName: 'Jenkins build timeout plugin' + shortName: 'build-timeout' + version: "1.13" diff --git a/tests/wrappers/fixtures/timeout/version-1.13/full-1.13.xml b/tests/wrappers/fixtures/timeout/version-1.13/full-1.13.xml new file mode 100644 index 000000000..a8f6d9790 --- /dev/null +++ b/tests/wrappers/fixtures/timeout/version-1.13/full-1.13.xml @@ -0,0 +1,14 @@ + + + + + 10 + BUILD_TIMEOUT + true + sample timeout description + 150 + 90 + elastic + + + diff --git a/tests/wrappers/fixtures/timeout/version-1.13/full-1.13.yaml b/tests/wrappers/fixtures/timeout/version-1.13/full-1.13.yaml new file mode 100644 index 000000000..0a8220bbb --- /dev/null +++ b/tests/wrappers/fixtures/timeout/version-1.13/full-1.13.yaml @@ -0,0 +1,9 @@ +wrappers: +- timeout: + timeout: 10 + timeout-var: 'BUILD_TIMEOUT' + fail: true + write-description: sample timeout description + elastic-percentage: 150 + elastic-default-timeout: 90 + type: elastic