File: kubectl_test.py

package info (click to toggle)
python-mitogen 0.3.26-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,456 kB
  • sloc: python: 22,134; sh: 183; makefile: 74; perl: 19; ansic: 18
file content (19 lines) | stat: -rw-r--r-- 543 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import os

import testlib


class ConstructorTest(testlib.RouterMixin, testlib.TestCase):
    kubectl_path = testlib.data_path('stubs/stub-kubectl.py')

    def test_okay(self):
        context = self.router.kubectl(
            pod='pod_name',
            kubectl_path=self.kubectl_path
        )

        argv = eval(context.call(os.getenv, 'ORIGINAL_ARGV'))
        self.assertEqual(argv[0], self.kubectl_path)
        self.assertEqual(argv[1], 'exec')
        self.assertEqual(argv[2], '-it')
        self.assertEqual(argv[3], 'pod_name')