mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-06 13:02:37 +00:00
* new module helm_registry_auth * Initial integration tests * final update copyright and integration test before pr * update link to pr in changelog fragment * reformat plugins/module_utils/helm.py with black to fix linters in actions * attempt to fix unit test unit test was missing initially * fix https://pycqa.github.io/isort/ linter * next attemp to fix unit-test * remove unused and unsupported helm_args_common * remove unused imports and fix other linters errors * another fix for unit test * fix issue introducied by commit ff02893a12a31f9c44b5c48f9a8bf85057295961 * add binary_path to arg_spec * return helm_cmd in the output of check mode remove changlog fragment * description suggestion from reviewer/maintainer Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * description suggestion from reviewer/maintainer Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * description suggestion from reviewer/maintainer Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * description suggestion from reviewer/maintainer Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * description suggestion from reviewer/maintainer Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * description suggestion from reviewer/maintainer Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * description suggestion from reviewer/maintainer Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * description suggestion from reviewer/maintainer Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * remove changed from module return Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * remove redundant code Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * Update plugins/modules/helm_registry_auth.py Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * consider support of logout when user is not logged in Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * consider support helm < 3.0.0 * Revert "consider support helm < 3.0.0" This reverts commitf20004d196. * reintroduce support of helm version less than 3.8.0 reference: https://helm.sh/docs/topics/registries/#enabling-oci-support-prior-to-v380 * revert reintroducing support of helm < 3.8.0 reason: didn't find a quick way to deal with tests * update documentation with the recent module updates * Update plugins/modules/helm_registry_auth.py Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * add test of logout impendency Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * fix linters * fix intendations in the integration tests * create tests/integration/targets/helm_registry_auth/aliases * fix integration test (typo) * fix integration tests (test wrong cred) * add stderr when module fail * another attempt to fix integration test * fix assertion in integration test to be not affceted by the #830 --------- Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> (cherry picked from commitaee847431a) Co-authored-by: Yuriy Novostavskiy <yuriy@novostavskiy.kiev.ua>
This commit is contained in:
@@ -51,7 +51,7 @@ class TestDependencyUpdateWithoutChartRepoUrlOption(unittest.TestCase):
|
||||
with self.assertRaises(AnsibleExitJson) as result:
|
||||
helm_template.main()
|
||||
mock_run_command.assert_called_once_with(
|
||||
"/usr/bin/helm template /tmp/path", environ_update={}
|
||||
"/usr/bin/helm template /tmp/path", environ_update={}, data=None
|
||||
)
|
||||
assert result.exception.args[0]["command"] == "/usr/bin/helm template /tmp/path"
|
||||
|
||||
@@ -74,6 +74,7 @@ class TestDependencyUpdateWithoutChartRepoUrlOption(unittest.TestCase):
|
||||
mock_run_command.assert_called_once_with(
|
||||
"/usr/bin/helm template test --repo=https://charts.com/test",
|
||||
environ_update={},
|
||||
data=None,
|
||||
)
|
||||
assert (
|
||||
result.exception.args[0]["command"]
|
||||
@@ -95,6 +96,7 @@ class TestDependencyUpdateWithoutChartRepoUrlOption(unittest.TestCase):
|
||||
mock_run_command.assert_called_once_with(
|
||||
"/usr/bin/helm template https://charts/example.tgz --dependency-update",
|
||||
environ_update={},
|
||||
data=None,
|
||||
)
|
||||
assert (
|
||||
result.exception.args[0]["command"]
|
||||
|
||||
@@ -88,6 +88,7 @@ class TestDependencyUpdateWithoutChartRepoUrlOption(unittest.TestCase):
|
||||
mock_run_command.assert_called_once_with(
|
||||
"/usr/bin/helm upgrade -i --reset-values test '/tmp/path'",
|
||||
environ_update={"HELM_NAMESPACE": "test"},
|
||||
data=None,
|
||||
)
|
||||
assert (
|
||||
result.exception.args[0]["command"]
|
||||
@@ -118,6 +119,7 @@ class TestDependencyUpdateWithoutChartRepoUrlOption(unittest.TestCase):
|
||||
mock_run_command.assert_called_once_with(
|
||||
"/usr/bin/helm upgrade -i --reset-values test '/tmp/path'",
|
||||
environ_update={"HELM_NAMESPACE": "test"},
|
||||
data=None,
|
||||
)
|
||||
assert (
|
||||
result.exception.args[0]["command"]
|
||||
@@ -147,6 +149,7 @@ class TestDependencyUpdateWithoutChartRepoUrlOption(unittest.TestCase):
|
||||
call(
|
||||
"/usr/bin/helm upgrade -i --reset-values test '/tmp/path'",
|
||||
environ_update={"HELM_NAMESPACE": "test"},
|
||||
data=None,
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -181,6 +184,7 @@ class TestDependencyUpdateWithoutChartRepoUrlOption(unittest.TestCase):
|
||||
call(
|
||||
"/usr/bin/helm upgrade -i --reset-values test '/tmp/path'",
|
||||
environ_update={"HELM_NAMESPACE": "test"},
|
||||
data=None,
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -251,6 +255,7 @@ class TestDependencyUpdateWithChartRepoUrlOption(unittest.TestCase):
|
||||
mock_run_command.assert_called_once_with(
|
||||
"/usr/bin/helm --repo=http://repo.example/charts upgrade -i --reset-values test 'chart1'",
|
||||
environ_update={"HELM_NAMESPACE": "test"},
|
||||
data=None,
|
||||
)
|
||||
assert (
|
||||
result.exception.args[0]["command"]
|
||||
@@ -280,6 +285,7 @@ class TestDependencyUpdateWithChartRepoUrlOption(unittest.TestCase):
|
||||
mock_run_command.assert_called_once_with(
|
||||
"/usr/bin/helm --repo=http://repo.example/charts upgrade -i --reset-values test 'chart1'",
|
||||
environ_update={"HELM_NAMESPACE": "test"},
|
||||
data=None,
|
||||
)
|
||||
assert (
|
||||
result.exception.args[0]["command"]
|
||||
@@ -338,6 +344,7 @@ class TestDependencyUpdateWithChartRepoUrlOption(unittest.TestCase):
|
||||
mock_run_command.assert_called_once_with(
|
||||
"/usr/bin/helm --repo=http://repo.example/charts install --dependency-update --replace test 'chart1'",
|
||||
environ_update={"HELM_NAMESPACE": "test"},
|
||||
data=None,
|
||||
)
|
||||
assert (
|
||||
result.exception.args[0]["command"]
|
||||
@@ -405,6 +412,7 @@ class TestDependencyUpdateWithChartRefIsUrl(unittest.TestCase):
|
||||
mock_run_command.assert_called_once_with(
|
||||
"/usr/bin/helm upgrade -i --reset-values test 'http://repo.example/charts/application.tgz'",
|
||||
environ_update={"HELM_NAMESPACE": "test"},
|
||||
data=None,
|
||||
)
|
||||
assert (
|
||||
result.exception.args[0]["command"]
|
||||
@@ -433,6 +441,7 @@ class TestDependencyUpdateWithChartRefIsUrl(unittest.TestCase):
|
||||
mock_run_command.assert_called_once_with(
|
||||
"/usr/bin/helm upgrade -i --reset-values test 'http://repo.example/charts/application.tgz'",
|
||||
environ_update={"HELM_NAMESPACE": "test"},
|
||||
data=None,
|
||||
)
|
||||
assert (
|
||||
result.exception.args[0]["command"]
|
||||
@@ -489,6 +498,7 @@ class TestDependencyUpdateWithChartRefIsUrl(unittest.TestCase):
|
||||
mock_run_command.assert_called_once_with(
|
||||
"/usr/bin/helm install --dependency-update --replace test 'http://repo.example/charts/application.tgz'",
|
||||
environ_update={"HELM_NAMESPACE": "test"},
|
||||
data=None,
|
||||
)
|
||||
assert (
|
||||
result.exception.args[0]["command"]
|
||||
|
||||
Reference in New Issue
Block a user