def test_validate_if_ssh_known_hosts_are_added(self):
    docs = render_chart(values={'dags': {'gitSync': {'enabled': True, 'containerName': 'git-sync-test', 'sshKeySecret': 'ssh-secret', 'knownHosts': 'github.com ssh-rsa AAAABdummy', 'branch': 'test-branch'}}}, show_only=['templates/pod-template-file.yaml'], chart_dir=self.temp_chart_dir)
    assert ({'name': 'GIT_KNOWN_HOSTS', 'value': 'true'} in jmespath.search('spec.initContainers[0].env', docs[0]))
    assert ({'name': 'git-sync-known-hosts', 'configMap': {'defaultMode': 288, 'name': 'RELEASE-NAME-airflow-config'}} in jmespath.search('spec.volumes', docs[0]))
    assert ({'name': 'git-sync-known-hosts', 'mountPath': '/etc/git-secret/known_hosts', 'subPath': 'known_hosts'} in jmespath.search('spec.containers[0].volumeMounts', docs[0]))
def test_validate_if_ssh_known_hosts_are_added(self):
    docs = render_chart(values={'dags': {'gitSync': {'enabled': True, 'containerName': 'git-sync-test', 'sshKeySecret': 'ssh-secret', 'knownHosts': 'github.com ssh-rsa AAAABdummy', 'branch': 'test-branch'}}}, show_only=['templates/pod-template-file.yaml'], chart_dir=self.temp_chart_dir)
    assert ({'name': 'GIT_KNOWN_HOSTS', 'value': 'true'} in jmespath.search('spec.initContainers[0].env', docs[0]))
    assert ({'name': 'git-sync-known-hosts', 'configMap': {'defaultMode': 288, 'name': 'RELEASE-NAME-airflow-config'}} in jmespath.search('spec.volumes', docs[0]))
    assert ({'name': 'git-sync-known-hosts', 'mountPath': '/etc/git-secret/known_hosts', 'subPath': 'known_hosts'} in jmespath.search('spec.containers[0].volumeMounts', docs[0]))