From 02451152198e323bf5f39c460a2df44b889b696b Mon Sep 17 00:00:00 2001 From: ZephOne Date: Sat, 11 Jan 2025 22:40:29 +0100 Subject: [PATCH] Add test for cpanm --with-recommends --- tests/unit/plugins/modules/test_cpanm.yaml | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/tests/unit/plugins/modules/test_cpanm.yaml b/tests/unit/plugins/modules/test_cpanm.yaml index ff4bd9c0f7e..22c035efe52 100644 --- a/tests/unit/plugins/modules/test_cpanm.yaml +++ b/tests/unit/plugins/modules/test_cpanm.yaml @@ -357,3 +357,43 @@ cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm) perl version 5.041005 (/usr/local/bin/perl) err: "" +- id: install_dancer_with_recommends + input: + name: Dancer2 + install_recommendations: true + output: + changed: true + mocks: + run_command: + - command: [/testbin/cpanm, --version] + environ: *env-def-true + rc: 0 + out: | + cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm) + perl version 5.041005 (/usr/local/bin/perl) + err: "" + - command: [/testbin/cpanm, --with-recommends, Dancer2] + environ: *env-def-true + rc: 0 + out: "" + err: "" +- id: install_dancer_with_suggests + input: + name: Dancer2 + install_suggestions: true + output: + changed: true + mocks: + run_command: + - command: [/testbin/cpanm, --version] + environ: *env-def-true + rc: 0 + out: | + cpanm (App::cpanminus) version 1.7047 (/usr/local/bin/cpanm) + perl version 5.041005 (/usr/local/bin/perl) + err: "" + - command: [/testbin/cpanm, --with-suggests, Dancer2] + environ: *env-def-true + rc: 0 + out: "" + err: ""