mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-07-30 03:14:40 +00:00
next attemp to fix unit-test
This commit is contained in:
@@ -51,7 +51,7 @@ class TestDependencyUpdateWithoutChartRepoUrlOption(unittest.TestCase):
|
|||||||
with self.assertRaises(AnsibleExitJson) as result:
|
with self.assertRaises(AnsibleExitJson) as result:
|
||||||
helm_template.main()
|
helm_template.main()
|
||||||
mock_run_command.assert_called_once_with(
|
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"
|
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(
|
mock_run_command.assert_called_once_with(
|
||||||
"/usr/bin/helm template test --repo=https://charts.com/test",
|
"/usr/bin/helm template test --repo=https://charts.com/test",
|
||||||
environ_update={},
|
environ_update={},
|
||||||
|
data=None,
|
||||||
)
|
)
|
||||||
assert (
|
assert (
|
||||||
result.exception.args[0]["command"]
|
result.exception.args[0]["command"]
|
||||||
@@ -95,6 +96,7 @@ class TestDependencyUpdateWithoutChartRepoUrlOption(unittest.TestCase):
|
|||||||
mock_run_command.assert_called_once_with(
|
mock_run_command.assert_called_once_with(
|
||||||
"/usr/bin/helm template https://charts/example.tgz --dependency-update",
|
"/usr/bin/helm template https://charts/example.tgz --dependency-update",
|
||||||
environ_update={},
|
environ_update={},
|
||||||
|
data=None,
|
||||||
)
|
)
|
||||||
assert (
|
assert (
|
||||||
result.exception.args[0]["command"]
|
result.exception.args[0]["command"]
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ class TestDependencyUpdateWithoutChartRepoUrlOption(unittest.TestCase):
|
|||||||
mock_run_command.assert_called_once_with(
|
mock_run_command.assert_called_once_with(
|
||||||
"/usr/bin/helm upgrade -i --reset-values test '/tmp/path'",
|
"/usr/bin/helm upgrade -i --reset-values test '/tmp/path'",
|
||||||
environ_update={"HELM_NAMESPACE": "test"},
|
environ_update={"HELM_NAMESPACE": "test"},
|
||||||
|
data=None,
|
||||||
)
|
)
|
||||||
assert (
|
assert (
|
||||||
result.exception.args[0]["command"]
|
result.exception.args[0]["command"]
|
||||||
@@ -118,6 +119,7 @@ class TestDependencyUpdateWithoutChartRepoUrlOption(unittest.TestCase):
|
|||||||
mock_run_command.assert_called_once_with(
|
mock_run_command.assert_called_once_with(
|
||||||
"/usr/bin/helm upgrade -i --reset-values test '/tmp/path'",
|
"/usr/bin/helm upgrade -i --reset-values test '/tmp/path'",
|
||||||
environ_update={"HELM_NAMESPACE": "test"},
|
environ_update={"HELM_NAMESPACE": "test"},
|
||||||
|
data=None,
|
||||||
)
|
)
|
||||||
assert (
|
assert (
|
||||||
result.exception.args[0]["command"]
|
result.exception.args[0]["command"]
|
||||||
@@ -251,6 +253,7 @@ class TestDependencyUpdateWithChartRepoUrlOption(unittest.TestCase):
|
|||||||
mock_run_command.assert_called_once_with(
|
mock_run_command.assert_called_once_with(
|
||||||
"/usr/bin/helm --repo=http://repo.example/charts upgrade -i --reset-values test 'chart1'",
|
"/usr/bin/helm --repo=http://repo.example/charts upgrade -i --reset-values test 'chart1'",
|
||||||
environ_update={"HELM_NAMESPACE": "test"},
|
environ_update={"HELM_NAMESPACE": "test"},
|
||||||
|
data=None,
|
||||||
)
|
)
|
||||||
assert (
|
assert (
|
||||||
result.exception.args[0]["command"]
|
result.exception.args[0]["command"]
|
||||||
@@ -280,6 +283,7 @@ class TestDependencyUpdateWithChartRepoUrlOption(unittest.TestCase):
|
|||||||
mock_run_command.assert_called_once_with(
|
mock_run_command.assert_called_once_with(
|
||||||
"/usr/bin/helm --repo=http://repo.example/charts upgrade -i --reset-values test 'chart1'",
|
"/usr/bin/helm --repo=http://repo.example/charts upgrade -i --reset-values test 'chart1'",
|
||||||
environ_update={"HELM_NAMESPACE": "test"},
|
environ_update={"HELM_NAMESPACE": "test"},
|
||||||
|
data=None,
|
||||||
)
|
)
|
||||||
assert (
|
assert (
|
||||||
result.exception.args[0]["command"]
|
result.exception.args[0]["command"]
|
||||||
@@ -338,6 +342,7 @@ class TestDependencyUpdateWithChartRepoUrlOption(unittest.TestCase):
|
|||||||
mock_run_command.assert_called_once_with(
|
mock_run_command.assert_called_once_with(
|
||||||
"/usr/bin/helm --repo=http://repo.example/charts install --dependency-update --replace test 'chart1'",
|
"/usr/bin/helm --repo=http://repo.example/charts install --dependency-update --replace test 'chart1'",
|
||||||
environ_update={"HELM_NAMESPACE": "test"},
|
environ_update={"HELM_NAMESPACE": "test"},
|
||||||
|
data=None,
|
||||||
)
|
)
|
||||||
assert (
|
assert (
|
||||||
result.exception.args[0]["command"]
|
result.exception.args[0]["command"]
|
||||||
@@ -405,6 +410,7 @@ class TestDependencyUpdateWithChartRefIsUrl(unittest.TestCase):
|
|||||||
mock_run_command.assert_called_once_with(
|
mock_run_command.assert_called_once_with(
|
||||||
"/usr/bin/helm upgrade -i --reset-values test 'http://repo.example/charts/application.tgz'",
|
"/usr/bin/helm upgrade -i --reset-values test 'http://repo.example/charts/application.tgz'",
|
||||||
environ_update={"HELM_NAMESPACE": "test"},
|
environ_update={"HELM_NAMESPACE": "test"},
|
||||||
|
data=None,
|
||||||
)
|
)
|
||||||
assert (
|
assert (
|
||||||
result.exception.args[0]["command"]
|
result.exception.args[0]["command"]
|
||||||
@@ -433,6 +439,7 @@ class TestDependencyUpdateWithChartRefIsUrl(unittest.TestCase):
|
|||||||
mock_run_command.assert_called_once_with(
|
mock_run_command.assert_called_once_with(
|
||||||
"/usr/bin/helm upgrade -i --reset-values test 'http://repo.example/charts/application.tgz'",
|
"/usr/bin/helm upgrade -i --reset-values test 'http://repo.example/charts/application.tgz'",
|
||||||
environ_update={"HELM_NAMESPACE": "test"},
|
environ_update={"HELM_NAMESPACE": "test"},
|
||||||
|
data=None,
|
||||||
)
|
)
|
||||||
assert (
|
assert (
|
||||||
result.exception.args[0]["command"]
|
result.exception.args[0]["command"]
|
||||||
@@ -489,6 +496,7 @@ class TestDependencyUpdateWithChartRefIsUrl(unittest.TestCase):
|
|||||||
mock_run_command.assert_called_once_with(
|
mock_run_command.assert_called_once_with(
|
||||||
"/usr/bin/helm install --dependency-update --replace test 'http://repo.example/charts/application.tgz'",
|
"/usr/bin/helm install --dependency-update --replace test 'http://repo.example/charts/application.tgz'",
|
||||||
environ_update={"HELM_NAMESPACE": "test"},
|
environ_update={"HELM_NAMESPACE": "test"},
|
||||||
|
data=None,
|
||||||
)
|
)
|
||||||
assert (
|
assert (
|
||||||
result.exception.args[0]["command"]
|
result.exception.args[0]["command"]
|
||||||
|
|||||||
Reference in New Issue
Block a user