| 1 |
From: Stefano Rivera <[email protected]> |
| 2 |
Date: Sat, 24 Apr 2021 11:44:49 -0400 |
| 3 |
Subject: tests: Use the "python3" interpreter |
| 4 |
|
| 5 |
The "python" binary isn't available in Debian buster. Except via the |
| 6 |
python-is-* packages, which are only for end-user use. |
| 7 |
--- |
| 8 |
tests/data/broker_shutdown_test_python.py | 2 +- |
| 9 |
tests/data/python_never_responds.py | 2 +- |
| 10 |
tests/data/stubs/stub-buildah.py | 2 +- |
| 11 |
tests/data/stubs/stub-doas.py | 2 +- |
| 12 |
tests/data/stubs/stub-docker.py | 2 +- |
| 13 |
tests/data/stubs/stub-incus.py | 2 +- |
| 14 |
tests/data/stubs/stub-jexec.py | 2 +- |
| 15 |
tests/data/stubs/stub-kubectl.py | 2 +- |
| 16 |
tests/data/stubs/stub-lxc-attach.py | 2 +- |
| 17 |
tests/data/stubs/stub-lxc-info.py | 2 +- |
| 18 |
tests/data/stubs/stub-lxc.py | 2 +- |
| 19 |
tests/data/stubs/stub-podman.py | 2 +- |
| 20 |
tests/data/stubs/stub-python.py | 2 +- |
| 21 |
tests/data/stubs/stub-ssh.py | 2 +- |
| 22 |
tests/data/stubs/stub-su.py | 2 +- |
| 23 |
tests/data/stubs/stub-sudo.py | 2 +- |
| 24 |
tests/incus_test.py | 1 + |
| 25 |
tests/lxd_test.py | 1 + |
| 26 |
tests/ssh_test.py | 2 ++ |
| 27 |
19 files changed, 20 insertions(+), 16 deletions(-) |
| 28 |
|
| 29 |
diff --git a/tests/data/broker_shutdown_test_python.py b/tests/data/broker_shutdown_test_python.py |
| 30 |
index f1e20c1..ae812d8 100755 |
| 31 |
--- a/tests/data/broker_shutdown_test_python.py |
| 32 |
+++ b/tests/data/broker_shutdown_test_python.py |
| 33 |
@@ -1,4 +1,4 @@ |
| 34 |
-#!/usr/bin/env python |
| 35 |
+#!/usr/bin/env python3 |
| 36 |
# Delete a semaphore file to allow the main thread to wake up, then sleep for |
| 37 |
# 30 seconds before starting the real Python. |
| 38 |
import os |
| 39 |
diff --git a/tests/data/python_never_responds.py b/tests/data/python_never_responds.py |
| 40 |
index 9caa5a6..cdf4b6e 100755 |
| 41 |
--- a/tests/data/python_never_responds.py |
| 42 |
+++ b/tests/data/python_never_responds.py |
| 43 |
@@ -1,4 +1,4 @@ |
| 44 |
-#!/usr/bin/env python |
| 45 |
+#!/usr/bin/env python3 |
| 46 |
# I am a Python interpreter that sits idle until the connection times out. |
| 47 |
|
| 48 |
import time |
| 49 |
diff --git a/tests/data/stubs/stub-buildah.py b/tests/data/stubs/stub-buildah.py |
| 50 |
index 558f117..0302480 100755 |
| 51 |
--- a/tests/data/stubs/stub-buildah.py |
| 52 |
+++ b/tests/data/stubs/stub-buildah.py |
| 53 |
@@ -1,4 +1,4 @@ |
| 54 |
-#!/usr/bin/env python |
| 55 |
+#!/usr/bin/env python3 |
| 56 |
|
| 57 |
import sys |
| 58 |
import os |
| 59 |
diff --git a/tests/data/stubs/stub-doas.py b/tests/data/stubs/stub-doas.py |
| 60 |
index ca929bc..8156098 100755 |
| 61 |
--- a/tests/data/stubs/stub-doas.py |
| 62 |
+++ b/tests/data/stubs/stub-doas.py |
| 63 |
@@ -1,4 +1,4 @@ |
| 64 |
-#!/usr/bin/env python |
| 65 |
+#!/usr/bin/env python3 |
| 66 |
|
| 67 |
import json |
| 68 |
import os |
| 69 |
diff --git a/tests/data/stubs/stub-docker.py b/tests/data/stubs/stub-docker.py |
| 70 |
index 341cc81..864d922 100755 |
| 71 |
--- a/tests/data/stubs/stub-docker.py |
| 72 |
+++ b/tests/data/stubs/stub-docker.py |
| 73 |
@@ -1,4 +1,4 @@ |
| 74 |
-#!/usr/bin/env python |
| 75 |
+#!/usr/bin/env python3 |
| 76 |
|
| 77 |
import sys |
| 78 |
import os |
| 79 |
diff --git a/tests/data/stubs/stub-incus.py b/tests/data/stubs/stub-incus.py |
| 80 |
index 5445d94..90e00fb 100755 |
| 81 |
--- a/tests/data/stubs/stub-incus.py |
| 82 |
+++ b/tests/data/stubs/stub-incus.py |
| 83 |
@@ -1,4 +1,4 @@ |
| 84 |
-#!/usr/bin/env python |
| 85 |
+#!/usr/bin/env python3 |
| 86 |
|
| 87 |
import sys |
| 88 |
import os |
| 89 |
diff --git a/tests/data/stubs/stub-jexec.py b/tests/data/stubs/stub-jexec.py |
| 90 |
index 3f3e3bd..0a71742 100755 |
| 91 |
--- a/tests/data/stubs/stub-jexec.py |
| 92 |
+++ b/tests/data/stubs/stub-jexec.py |
| 93 |
@@ -1,4 +1,4 @@ |
| 94 |
-#!/usr/bin/env python |
| 95 |
+#!/usr/bin/env python3 |
| 96 |
|
| 97 |
import json |
| 98 |
import os |
| 99 |
diff --git a/tests/data/stubs/stub-kubectl.py b/tests/data/stubs/stub-kubectl.py |
| 100 |
index 16f7e46..6f38313 100755 |
| 101 |
--- a/tests/data/stubs/stub-kubectl.py |
| 102 |
+++ b/tests/data/stubs/stub-kubectl.py |
| 103 |
@@ -1,4 +1,4 @@ |
| 104 |
-#!/usr/bin/env python |
| 105 |
+#!/usr/bin/env python3 |
| 106 |
|
| 107 |
import sys |
| 108 |
import os |
| 109 |
diff --git a/tests/data/stubs/stub-lxc-attach.py b/tests/data/stubs/stub-lxc-attach.py |
| 110 |
index 5263d36..b641aec 100755 |
| 111 |
--- a/tests/data/stubs/stub-lxc-attach.py |
| 112 |
+++ b/tests/data/stubs/stub-lxc-attach.py |
| 113 |
@@ -1,4 +1,4 @@ |
| 114 |
-#!/usr/bin/env python |
| 115 |
+#!/usr/bin/env python3 |
| 116 |
|
| 117 |
import sys |
| 118 |
import os |
| 119 |
diff --git a/tests/data/stubs/stub-lxc-info.py b/tests/data/stubs/stub-lxc-info.py |
| 120 |
index 480bf26..c8b2b99 100755 |
| 121 |
--- a/tests/data/stubs/stub-lxc-info.py |
| 122 |
+++ b/tests/data/stubs/stub-lxc-info.py |
| 123 |
@@ -1,4 +1,4 @@ |
| 124 |
-#!/usr/bin/env python |
| 125 |
+#!/usr/bin/env python3 |
| 126 |
# Mainly for use in stubconnections/kubectl.yml |
| 127 |
|
| 128 |
print('PID: 1') |
| 129 |
diff --git a/tests/data/stubs/stub-lxc.py b/tests/data/stubs/stub-lxc.py |
| 130 |
index 9d14090..288ebbe 100755 |
| 131 |
--- a/tests/data/stubs/stub-lxc.py |
| 132 |
+++ b/tests/data/stubs/stub-lxc.py |
| 133 |
@@ -1,4 +1,4 @@ |
| 134 |
-#!/usr/bin/env python |
| 135 |
+#!/usr/bin/env python3 |
| 136 |
|
| 137 |
import sys |
| 138 |
import os |
| 139 |
diff --git a/tests/data/stubs/stub-podman.py b/tests/data/stubs/stub-podman.py |
| 140 |
index 28f5518..1e86475 100755 |
| 141 |
--- a/tests/data/stubs/stub-podman.py |
| 142 |
+++ b/tests/data/stubs/stub-podman.py |
| 143 |
@@ -1,4 +1,4 @@ |
| 144 |
-#!/usr/bin/env python |
| 145 |
+#!/usr/bin/env python3 |
| 146 |
|
| 147 |
import sys |
| 148 |
import os |
| 149 |
diff --git a/tests/data/stubs/stub-python.py b/tests/data/stubs/stub-python.py |
| 150 |
index f18b0b6..27cd292 100755 |
| 151 |
--- a/tests/data/stubs/stub-python.py |
| 152 |
+++ b/tests/data/stubs/stub-python.py |
| 153 |
@@ -1,4 +1,4 @@ |
| 154 |
-#!/usr/bin/env python |
| 155 |
+#!/usr/bin/env python3 |
| 156 |
|
| 157 |
import json |
| 158 |
import os |
| 159 |
diff --git a/tests/data/stubs/stub-ssh.py b/tests/data/stubs/stub-ssh.py |
| 160 |
index 80c0283..a04f993 100755 |
| 161 |
--- a/tests/data/stubs/stub-ssh.py |
| 162 |
+++ b/tests/data/stubs/stub-ssh.py |
| 163 |
@@ -1,4 +1,4 @@ |
| 164 |
-#!/usr/bin/env python |
| 165 |
+#!/usr/bin/env python3 |
| 166 |
|
| 167 |
import optparse |
| 168 |
import os |
| 169 |
diff --git a/tests/data/stubs/stub-su.py b/tests/data/stubs/stub-su.py |
| 170 |
index e353a75..4adad61 100755 |
| 171 |
--- a/tests/data/stubs/stub-su.py |
| 172 |
+++ b/tests/data/stubs/stub-su.py |
| 173 |
@@ -1,4 +1,4 @@ |
| 174 |
-#!/usr/bin/env python |
| 175 |
+#!/usr/bin/env python3 |
| 176 |
|
| 177 |
import json |
| 178 |
import os |
| 179 |
diff --git a/tests/data/stubs/stub-sudo.py b/tests/data/stubs/stub-sudo.py |
| 180 |
index 71364df..b9b4b86 100755 |
| 181 |
--- a/tests/data/stubs/stub-sudo.py |
| 182 |
+++ b/tests/data/stubs/stub-sudo.py |
| 183 |
@@ -1,4 +1,4 @@ |
| 184 |
-#!/usr/bin/env python |
| 185 |
+#!/usr/bin/env python3 |
| 186 |
|
| 187 |
import json |
| 188 |
import os |
| 189 |
diff --git a/tests/incus_test.py b/tests/incus_test.py |
| 190 |
index 2cf6986..42aa42e 100644 |
| 191 |
--- a/tests/incus_test.py |
| 192 |
+++ b/tests/incus_test.py |
| 193 |
@@ -12,6 +12,7 @@ class ConstructorTest(testlib.RouterMixin, testlib.TestCase): |
| 194 |
context = self.router.incus( |
| 195 |
container='container_name', |
| 196 |
incus_path=incus_path, |
| 197 |
+ python_path='python3', |
| 198 |
) |
| 199 |
|
| 200 |
argv = eval(context.call(os.getenv, 'ORIGINAL_ARGV')) |
| 201 |
diff --git a/tests/lxd_test.py b/tests/lxd_test.py |
| 202 |
index 6573e1b..98e93ec 100644 |
| 203 |
--- a/tests/lxd_test.py |
| 204 |
+++ b/tests/lxd_test.py |
| 205 |
@@ -12,6 +12,7 @@ class ConstructorTest(testlib.RouterMixin, testlib.TestCase): |
| 206 |
context = self.router.lxd( |
| 207 |
container='container_name', |
| 208 |
lxc_path=lxc_path, |
| 209 |
+ python_path='python3', |
| 210 |
) |
| 211 |
|
| 212 |
argv = eval(context.call(os.getenv, 'ORIGINAL_ARGV')) |
| 213 |
diff --git a/tests/ssh_test.py b/tests/ssh_test.py |
| 214 |
index 7a01598..78003b6 100644 |
| 215 |
--- a/tests/ssh_test.py |
| 216 |
+++ b/tests/ssh_test.py |
| 217 |
@@ -17,6 +17,7 @@ class StubSshMixin(testlib.RouterMixin): |
| 218 |
return self.router.ssh( |
| 219 |
hostname='hostname', |
| 220 |
username='mitogen__has_sudo', |
| 221 |
+ python_path='python3', |
| 222 |
ssh_path=testlib.data_path('stubs/stub-ssh.py'), |
| 223 |
**kwargs |
| 224 |
) |
| 225 |
@@ -29,6 +30,7 @@ class ConstructorTest(testlib.RouterMixin, testlib.TestCase): |
| 226 |
context = self.router.ssh( |
| 227 |
hostname='hostname', |
| 228 |
username='mitogen__has_sudo', |
| 229 |
+ python_path='python3', |
| 230 |
ssh_path=testlib.data_path('stubs/stub-ssh.py'), |
| 231 |
) |
| 232 |
#context.call(mitogen.utils.log_to_file, '/tmp/log') |