summaryrefslogtreecommitdiff
path: root/dev-python/pytest-salt-factories/files/pytest-salt-factories-0.121.1-tests.patch
blob: 3e85580c91584299152fdea66d6d9b1fd4626009 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
diff --git a/saltfactories/plugin.py b/saltfactories/plugin.py
index b29a115..9d68c34 100644
--- a/saltfactories/plugin.py
+++ b/saltfactories/plugin.py
@@ -21,7 +21,7 @@ def pytest_tempdir_temproot():
         tempdir = os.environ.get("TMPDIR") or tempfile.gettempdir()
     else:
         tempdir = "/tmp"
-    return os.path.abspath(os.path.realpath(tempdir))
+    return os.path.abspath(tempdir)
 
 
 def pytest_tempdir_basename():
diff --git a/tests/functional/markers/test_requires_network.py b/tests/functional/markers/test_requires_network.py
index 8b57368..d58f0a1 100644
--- a/tests/functional/markers/test_requires_network.py
+++ b/tests/functional/markers/test_requires_network.py
@@ -9,7 +9,10 @@ from unittest import mock
 from saltfactories.utils import ports
 from saltfactories.utils import socket
 
+import pytest
 
+
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_has_local_network(testdir):
     testdir.makepyfile(
         """
diff --git a/tests/integration/factories/cli/test_salt.py b/tests/integration/factories/cli/test_salt.py
index 17fce6c..7bd2789 100644
--- a/tests/integration/factories/cli/test_salt.py
+++ b/tests/integration/factories/cli/test_salt.py
@@ -17,6 +17,7 @@ def salt_minion_2(salt_master, salt_minion):
         yield factory
 
 
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_merged_json_out(salt_cli, salt_minion, salt_minion_2):
     ret = salt_cli.run("test.ping", minion_tgt="*")
     assert ret.exitcode == 0, ret
@@ -27,6 +28,7 @@ def test_merged_json_out(salt_cli, salt_minion, salt_minion_2):
     assert ret.json[salt_minion_2.id] is True
 
 
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_merged_json_out_disabled(salt_cli, salt_minion, salt_minion_2):
     ret = salt_cli.run("test.ping", minion_tgt="*", merge_json_output=False)
     assert ret.exitcode == 0, ret
diff --git a/tests/integration/factories/daemons/api/test_api.py b/tests/integration/factories/daemons/api/test_api.py
index 78b8bb7..e20f28c 100644
--- a/tests/integration/factories/daemons/api/test_api.py
+++ b/tests/integration/factories/daemons/api/test_api.py
@@ -23,5 +23,6 @@ def salt_api(master):
         yield factory
 
 
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_api(salt_api):
     assert salt_api.is_running()
diff --git a/tests/integration/factories/daemons/api/test_restarts.py b/tests/integration/factories/daemons/api/test_restarts.py
index a6c5472..dd15c17 100644
--- a/tests/integration/factories/daemons/api/test_restarts.py
+++ b/tests/integration/factories/daemons/api/test_restarts.py
@@ -16,6 +16,7 @@ def master(salt_factories):
         yield factory
 
 
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_multiple_start_stops(master):
     factory = master.get_salt_api_daemon()
     assert factory.is_running() is False
diff --git a/tests/integration/factories/daemons/master/test_master.py b/tests/integration/factories/daemons/master/test_master.py
index 2676dfa..cbf598e 100644
--- a/tests/integration/factories/daemons/master/test_master.py
+++ b/tests/integration/factories/daemons/master/test_master.py
@@ -46,10 +46,12 @@ def salt_key(master):
     return master.get_salt_key_cli()
 
 
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_master(master):
     assert master.is_running()
 
 
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_salt_run(master, salt_run):
     max_open_files_config_value = master.config["max_open_files"]
     ret = salt_run.run("config.get", "max_open_files")
@@ -57,6 +59,7 @@ def test_salt_run(master, salt_run):
     assert ret.json == max_open_files_config_value
 
 
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_salt_cp(master, minion, salt_cp, tempfiles):
     """
     Test copying a file from the master to the minion
@@ -98,6 +101,7 @@ def test_salt_cp(master, minion, salt_cp, tempfiles):
             os.unlink(dest)
 
 
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_salt_cp_no_match(master, minion, salt_cp, tempfiles):
     assert master.is_running()
     assert minion.is_running()
@@ -119,6 +123,7 @@ def test_salt_cp_no_match(master, minion, salt_cp, tempfiles):
             os.unlink(dest)
 
 
+@pytest.mark.skip("not compatible with sandbox")
 @pytest.mark.skip_on_salt_system_install
 def test_salt_key(master, minion, minion_3, salt_key):
     ret = salt_key.run("--list-all")
diff --git a/tests/integration/factories/daemons/master/test_restarts.py b/tests/integration/factories/daemons/master/test_restarts.py
index 6a6852d..70415d0 100644
--- a/tests/integration/factories/daemons/master/test_restarts.py
+++ b/tests/integration/factories/daemons/master/test_restarts.py
@@ -11,6 +11,7 @@ def master(salt_factories):
     return factory
 
 
+@pytest.mark.skip("not compatible with network")
 def test_multiple_start_stops(master):
     assert master.is_running() is False
     pid = None
diff --git a/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py b/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
index d63e640..653693e 100644
--- a/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
+++ b/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
@@ -28,6 +28,7 @@ def salt_call_cli(minion):
     return minion.get_salt_call_cli()
 
 
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_event_listener_engine(minion, salt_call_cli, event_listener):
     """
     There are some events which the minion fires internally that never reach the master.
diff --git a/tests/integration/factories/daemons/minion/test_minion.py b/tests/integration/factories/daemons/minion/test_minion.py
index 64a3df6..ab82e55 100644
--- a/tests/integration/factories/daemons/minion/test_minion.py
+++ b/tests/integration/factories/daemons/minion/test_minion.py
@@ -27,6 +27,7 @@ def salt_call_cli(minion):
     return minion.get_salt_call_cli()
 
 
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_minion(minion, salt_cli):
     assert minion.is_running()
     ret = salt_cli.run("test.ping", minion_tgt=minion.id)
@@ -34,6 +35,7 @@ def test_minion(minion, salt_cli):
     assert ret.json is True
 
 
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_no_match(minion, salt_cli):
     assert minion.is_running()
     ret = salt_cli.run("test.ping", minion_tgt="minion-2")
@@ -41,6 +43,7 @@ def test_no_match(minion, salt_cli):
     assert not ret.json
 
 
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_show_jid(minion, salt_cli):
     assert minion.is_running()
     ret = salt_cli.run("--show-jid", "test.ping", minion_tgt=minion.id)
@@ -48,6 +51,7 @@ def test_show_jid(minion, salt_cli):
     assert ret.json is True
 
 
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_minion_salt_call(minion, salt_call_cli):
     assert minion.is_running()
     ret = salt_call_cli.run("test.ping")
@@ -59,6 +63,7 @@ def test_minion_salt_call(minion, salt_call_cli):
     assert ret.json is True
 
 
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_salt_call_exception_handling_doesnt_timeout(minion, salt_call_cli):
     ret = salt_call_cli.run(
         "test.raise_exception", "OSError", "2", "No such file or directory", "/tmp/foo.txt"
diff --git a/tests/integration/factories/daemons/minion/test_restarts.py b/tests/integration/factories/daemons/minion/test_restarts.py
index a7d9ae0..8f0401b 100644
--- a/tests/integration/factories/daemons/minion/test_restarts.py
+++ b/tests/integration/factories/daemons/minion/test_restarts.py
@@ -10,6 +10,7 @@ def master(salt_factories):
         yield factory
 
 
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_multiple_start_stops(master):
     factory = master.get_salt_minion_daemon(random_string("minion-"))
     assert factory.is_running() is False
diff --git a/tests/integration/factories/daemons/proxy/test_proxy_minion.py b/tests/integration/factories/daemons/proxy/test_proxy_minion.py
index 3bbca21..2e2fb8b 100644
--- a/tests/integration/factories/daemons/proxy/test_proxy_minion.py
+++ b/tests/integration/factories/daemons/proxy/test_proxy_minion.py
@@ -35,6 +35,7 @@ def salt_call_cli(proxy_minion):
     return proxy_minion.get_salt_call_cli()
 
 
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_proxy_minion(proxy_minion, salt_cli):
     assert proxy_minion.is_running()
     ret = salt_cli.run("test.ping", minion_tgt=proxy_minion.id)
@@ -42,6 +43,7 @@ def test_proxy_minion(proxy_minion, salt_cli):
     assert ret.json is True
 
 
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_no_match(proxy_minion, salt_cli):
     assert proxy_minion.is_running()
     ret = salt_cli.run("test.ping", minion_tgt="proxy-minion-2")
@@ -49,6 +51,7 @@ def test_no_match(proxy_minion, salt_cli):
     assert not ret.json
 
 
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_show_jid(proxy_minion, salt_cli):
     if platform.is_darwin() and sys.version_info[:2] == (3, 7):
         pytest.skip(
@@ -61,6 +64,7 @@ def test_show_jid(proxy_minion, salt_cli):
     assert ret.json is True
 
 
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_proxy_minion_salt_call(proxy_minion, salt_call_cli):
     assert proxy_minion.is_running()
     ret = salt_call_cli.run("test.ping")
diff --git a/tests/integration/factories/daemons/proxy/test_restarts.py b/tests/integration/factories/daemons/proxy/test_restarts.py
index 3101204..28652ff 100644
--- a/tests/integration/factories/daemons/proxy/test_restarts.py
+++ b/tests/integration/factories/daemons/proxy/test_restarts.py
@@ -17,6 +17,7 @@ def master(salt_factories):
         yield factory
 
 
+@pytest.mark.skip("not compatible with sandbox")
 def test_multiple_start_stops(master):
     factory = master.get_salt_proxy_minion_daemon(random_string("proxy-minion-"))
     assert factory.is_running() is False
diff --git a/tests/integration/factories/daemons/ssh/test_salt_ssh.py b/tests/integration/factories/daemons/ssh/test_salt_ssh.py
index f58eac4..c3df3de 100644
--- a/tests/integration/factories/daemons/ssh/test_salt_ssh.py
+++ b/tests/integration/factories/daemons/ssh/test_salt_ssh.py
@@ -51,6 +51,7 @@ def salt_ssh_cli(sshd, salt_factories, master):
 
 
 @pytest.mark.skip_on_windows
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_salt_ssh(salt_ssh_cli):
     ret = salt_ssh_cli.run("--ignore-host-keys", "test.echo", "It Works!", minion_tgt="localhost")
     assert ret.exitcode == 0
diff --git a/tests/integration/factories/daemons/sshd/test_sshd.py b/tests/integration/factories/daemons/sshd/test_sshd.py
index 3b425fc..3e03636 100644
--- a/tests/integration/factories/daemons/sshd/test_sshd.py
+++ b/tests/integration/factories/daemons/sshd/test_sshd.py
@@ -5,6 +5,7 @@ import pytest
 
 @pytest.fixture(scope="module")
 @pytest.mark.skip_if_binaries_missing("sshd", "ssh-keygen")
+@pytest.mark.skip("not compatible with network-sandbox")
 def sshd(salt_factories):
     # Set StrictModes to no because our config directory lives in /tmp and those permissions
     # are not acceptable by sshd strict paranoia.
@@ -15,12 +16,14 @@ def sshd(salt_factories):
 
 
 @pytest.mark.skip_on_windows
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_sshd(sshd):
     assert sshd.is_running()
 
 
 @pytest.mark.skip_on_windows
 @pytest.mark.skip_if_binaries_missing("ssh")
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_connect(sshd):
     cmd = subprocess.run(
         [
diff --git a/tests/unit/utils/markers/test_skip_if_no_remote_network.py b/tests/unit/utils/markers/test_skip_if_no_remote_network.py
index 1aa72dc..c4d079e 100644
--- a/tests/unit/utils/markers/test_skip_if_no_remote_network.py
+++ b/tests/unit/utils/markers/test_skip_if_no_remote_network.py
@@ -9,7 +9,10 @@ from unittest import mock
 import saltfactories.utils.markers as markers
 from saltfactories.utils import socket
 
+import pytest
 
+
+@pytest.mark.skip("not compatible with network-sandbox")
 def test_has_remote_network():
     assert markers.skip_if_no_remote_network() is None