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
|
diff --git a/tests/unit/transport/test_zeromq.py b/tests/unit/transport/test_zeromq.py
index ccb337462e..97d2962e5e 100644
--- a/tests/unit/transport/test_zeromq.py
+++ b/tests/unit/transport/test_zeromq.py
@@ -45,6 +45,10 @@ ON_SUSE = False
if 'SuSE' in linux_distribution(full_distribution_name=False):
ON_SUSE = True
+ON_GENTOO = False
+if 'Gentoo' in linux_distribution(full_distribution_name=False):
+ ON_GENTOO = True
+
class BaseZMQReqCase(TestCase, AdaptedConfigurationTestCaseMixin):
'''
@@ -122,63 +126,6 @@ class BaseZMQReqCase(TestCase, AdaptedConfigurationTestCaseMixin):
return payload, {'fun': 'send_clear'}
-class ClearReqTestCases(BaseZMQReqCase, ReqChannelMixin):
- '''
- Test all of the clear msg stuff
- '''
- def setUp(self):
- self.channel = salt.transport.client.ReqChannel.factory(self.minion_config, crypt='clear')
-
- def tearDown(self):
- del self.channel
-
- @classmethod
- @tornado.gen.coroutine
- def _handle_payload(cls, payload):
- '''
- TODO: something besides echo
- '''
- raise tornado.gen.Return((payload, {'fun': 'send_clear'}))
-
-
-@flaky
-@skipIf(ON_SUSE, 'Skipping until https://github.com/saltstack/salt/issues/32902 gets fixed')
-class AESReqTestCases(BaseZMQReqCase, ReqChannelMixin):
- def setUp(self):
- self.channel = salt.transport.client.ReqChannel.factory(self.minion_config)
-
- def tearDown(self):
- del self.channel
-
- @classmethod
- @tornado.gen.coroutine
- def _handle_payload(cls, payload):
- '''
- TODO: something besides echo
- '''
- raise tornado.gen.Return((payload, {'fun': 'send'}))
-
- # TODO: make failed returns have a specific framing so we can raise the same exception
- # on encrypted channels
- #
- #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- #
- # WARNING: This test will fail randomly on any system with > 1 CPU core!!!
- #
- #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- def test_badload(self):
- '''
- Test a variety of bad requests, make sure that we get some sort of error
- '''
- # TODO: This test should be re-enabled when Jenkins moves to C7.
- # Once the version of salt-testing is increased to something newer than the September
- # release of salt-testing, the @flaky decorator should be applied to this test.
- msgs = ['', [], tuple()]
- for msg in msgs:
- with self.assertRaises(salt.exceptions.AuthenticationError):
- ret = self.channel.send(msg, timeout=5)
-
-
class BaseZMQPubCase(AsyncTestCase, AdaptedConfigurationTestCaseMixin):
'''
Test the req server/client pair
|