From edd8af86891255fa4864f16de6688c08fab43ee0 Mon Sep 17 00:00:00 2001 From: John Freeman Date: Sat, 16 Nov 2024 15:29:07 +0000 Subject: [PATCH] Fixed Molecule tests Due to plugin changes. --- molecule/default/tests/test_role.py | 9 +++++---- molecule/opensuse/tests/test_role.py | 9 +++++---- molecule/rocky/tests/test_role.py | 9 +++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/molecule/default/tests/test_role.py b/molecule/default/tests/test_role.py index b2201b1..d2b005d 100644 --- a/molecule/default/tests/test_role.py +++ b/molecule/default/tests/test_role.py @@ -35,7 +35,7 @@ def test_config_files(host, file_path, expected_text): @pytest.mark.parametrize('plugin_dir_name', [ - 'google-java-format', + 'idea_plugin', 'MavenHelper' ]) def test_plugins_installed(host, plugin_dir_name): @@ -60,9 +60,10 @@ def test_jar_plugin_installed(host): '/home/test_usr', plugins_dir_pattern) - plugin_path = host.check_output('find %s | grep --color=never -E %s', - plugins_path, - 'save-actions.*\\.jar') + plugin_path = host.check_output( + 'find %s | grep --color=never -E %s | head -1', + plugins_path, + 'save-actions.*\\.jar') plugin_file = host.file(plugin_path) diff --git a/molecule/opensuse/tests/test_role.py b/molecule/opensuse/tests/test_role.py index f2b93d4..0cb1c6e 100644 --- a/molecule/opensuse/tests/test_role.py +++ b/molecule/opensuse/tests/test_role.py @@ -31,7 +31,7 @@ def test_config_files(host, file_path, expected_text): @pytest.mark.parametrize('plugin_dir_name', [ - 'google-java-format', + 'idea_plugin', 'MavenHelper' ]) def test_plugins_installed(host, plugin_dir_name): @@ -56,9 +56,10 @@ def test_jar_plugin_installed(host): '/home/test_usr', plugins_dir_pattern) - plugin_path = host.check_output('find %s | grep --color=never -E %s', - plugins_path, - 'save-actions.*\\.jar') + plugin_path = host.check_output( + 'find %s | grep --color=never -E %s | head -1', + plugins_path, + 'save-actions.*\\.jar') plugin_file = host.file(plugin_path) diff --git a/molecule/rocky/tests/test_role.py b/molecule/rocky/tests/test_role.py index 7b7c6ec..bc33156 100644 --- a/molecule/rocky/tests/test_role.py +++ b/molecule/rocky/tests/test_role.py @@ -31,7 +31,7 @@ def test_config_files(host, file_path, expected_text): @pytest.mark.parametrize('plugin_dir_name', [ - 'google-java-format', + 'idea_plugin', 'MavenHelper' ]) def test_plugins_installed(host, plugin_dir_name): @@ -56,9 +56,10 @@ def test_jar_plugin_installed(host): '/home/test_usr', plugins_dir_pattern) - plugin_path = host.check_output('find %s | grep --color=never -E %s', - plugins_path, - 'save-actions.*\\.jar') + plugin_path = host.check_output( + 'find %s | grep --color=never -E %s | head -1', + plugins_path, + 'save-actions.*\\.jar') plugin_file = host.file(plugin_path)