summaryrefslogtreecommitdiffstats
path: root/ansible/roles/kubectl/molecule/default/tests/test_default.py
blob: 3f4c7c7d23a6818179b5322374fab842841958f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import os

import testinfra.utils.ansible_runner

testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
    os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')


def test_kubectl(host):
    assert host.file('/usr/local/bin/kubectl').exists
    assert host.run('kubectl').rc != 127


def test_kubectl_bash_completion(host):
    assert host.file('/etc/bash_completion.d/kubectl').exists