def test_validate_if_ssh_params_are_added(self):
    docs = render_chart(values={'dags': {'gitSync': {'enabled': True, 'containerName': 'git-sync-test', 'sshKeySecret': 'ssh-secret', 'knownHosts': None, 'branch': 'test-branch'}}}, show_only=['templates/pod-template-file.yaml'], chart_dir=self.temp_chart_dir)
    assert ({'name': 'GIT_SSH_KEY_FILE', 'value': '/etc/git-secret/ssh'} in jmespath.search('spec.initContainers[0].env', docs[0]))
    assert ({'name': 'GIT_SYNC_SSH', 'value': 'true'} in jmespath.search('spec.initContainers[0].env', docs[0]))
    assert ({'name': 'GIT_KNOWN_HOSTS', 'value': 'false'} in jmespath.search('spec.initContainers[0].env', docs[0]))
    assert ({'name': 'git-sync-ssh-key', 'secret': {'secretName': 'ssh-secret', 'defaultMode': 288}} in jmespath.search('spec.volumes', docs[0]))
def test_validate_if_ssh_params_are_added(self):
    docs = render_chart(values={'dags': {'gitSync': {'enabled': True, 'containerName': 'git-sync-test', 'sshKeySecret': 'ssh-secret', 'knownHosts': None, 'branch': 'test-branch'}}}, show_only=['templates/pod-template-file.yaml'], chart_dir=self.temp_chart_dir)
    assert ({'name': 'GIT_SSH_KEY_FILE', 'value': '/etc/git-secret/ssh'} in jmespath.search('spec.initContainers[0].env', docs[0]))
    assert ({'name': 'GIT_SYNC_SSH', 'value': 'true'} in jmespath.search('spec.initContainers[0].env', docs[0]))
    assert ({'name': 'GIT_KNOWN_HOSTS', 'value': 'false'} in jmespath.search('spec.initContainers[0].env', docs[0]))
    assert ({'name': 'git-sync-ssh-key', 'secret': {'secretName': 'ssh-secret', 'defaultMode': 288}} in jmespath.search('spec.volumes', docs[0]))