Commit Graph

95863 Commits

Author SHA1 Message Date
Jeremy McMillan
475404d14b fix docstring quote style 2019-01-15 16:31:35 +00:00
Jeremy McMillan
71c357414d Revert "backport test improvements from develop"
This reverts commit 0af7653dfa3fc9b30601dec2c8ac2ce3cba52e7f.

I guess that was way too optimistic.
2019-01-15 16:31:35 +00:00
Jeremy McMillan
e32d219599 backport test improvements from develop
Bogus random test failures
forklifted from develop at 414bfe61a4
2019-01-15 16:31:35 +00:00
Jeremy McMillan
42654d8df9 socket.connect needs a tuple
TypeError
https://docs.python.org/2/library/socket.html
RTFD "Note This method has historically accepted a pair of parameters
for AF_INET addresses instead of only a tuple. This was never
intentional and is no longer available in Python 2.0 and later.
"
2019-01-15 16:31:35 +00:00
Jeremy McMillan
27254fce37 syntax error bad parentheses 2019-01-15 16:31:35 +00:00
Jeremy McMillan
24bb94fb9e Don't ip_bracket addresses returned by check_dns.
This ends up in opts['master_ip'] where it can cause problems. I found
this while testng a git+pip based minion installation on Ubuntu Bionic.
I'm not sure why it doesn't affect other targeted OS versions in the
test framework. On Bionic, if 'salt' resolves to an IPv6 address,
zmq fails to connect to the master, and complains about the bracketed
address.
2019-01-15 16:31:35 +00:00
Jeremy McMillan
02b825ec3c expose error in tests
Error Message
object of type 'NoneType' has no len()
Stacktrace
Traceback (most recent call last):
  File "/tmp/kitchen/testing/tests/unit/utils/test_network.py", line 225, in test_parse_host_port
    host, port = network.parse_host_port(host_port)
  File "/tmp/kitchen/testing/salt/utils/network.py", line 1957, in parse_host_port
    raise _e_
TypeError: object of type 'NoneType' has no len()
2019-01-15 16:31:35 +00:00
Jeremy McMillan
0a92c4691d Need more detail on test failure 2019-01-15 16:31:35 +00:00
Jeremy McMillan
3574698a70 ip_address does not need str() and parse_host_port handles ipv6 or ipv4
note:
@isbm requested ip_address objects stay ip_address. They implement __str__
so they should work without explicit str() conversion if necessary.
2019-01-15 16:31:35 +00:00
Jeremy McMillan
7a6bc576d1 avoid TypeError by not constructing an ip_address from an ip_address 2019-01-15 16:31:35 +00:00
Jeremy McMillan
35410dde5c try to debug error in tests (revert me)
Error Message
object of type 'NoneType' has no len()
Stacktrace
Traceback (most recent call last):
  File "/tmp/kitchen/testing/tests/unit/utils/test_network.py", line 225, in test_parse_host_port
    host, port = network.parse_host_port(host_port)
  File "/tmp/kitchen/testing/salt/utils/network.py", line 1957, in parse_host_port
    raise _e_
TypeError: object of type 'NoneType' has no len()
2019-01-15 16:31:35 +00:00
Jeremy McMillan
2f8ca47549 wordsmithing 2019-01-15 16:31:35 +00:00
Jeremy McMillan
1dd1f7dd86 parsing logic error 2019-01-15 16:31:35 +00:00
Jeremy McMillan
98041c1158 minimize diff 2019-01-15 16:31:35 +00:00
Jeremy McMillan
c92a24752c don't try to handle/log test exception 2019-01-15 16:31:35 +00:00
Jeremy McMillan
eb605867c6 remove bad extra test assertion inside exception handler 2019-01-15 16:31:35 +00:00
Jeremy McMillan
e1e5d874ba checking for truthiness better than len 2019-01-15 16:31:35 +00:00
Jeremy McMillan
a984a43995 typo in ipaddress.IPv6Address() 2019-01-15 16:31:35 +00:00
Jeremy McMillan
5fc6c602c2 clear up lint, disambiguation 2019-01-15 16:31:35 +00:00
Jeremy McMillan
8c6dfea8eb lint pep8 whitespace 2019-01-15 16:31:35 +00:00
Jeremy McMillan
f9594b8a1f don't test invalid combination 2019-01-15 16:31:35 +00:00
Jeremy McMillan
de823fd3ae fix good_host_ports iteration 2019-01-15 16:31:35 +00:00
Jeremy McMillan
c5a5b34fc4 test assertion correction 2019-01-15 16:31:35 +00:00
Jeremy McMillan
e169e0df54 fixup rebase merge goof 2019-01-15 16:31:35 +00:00
Jeremy McMillan
d28bab6fd0 fix test setup 2019-01-15 16:31:35 +00:00
Jeremy McMillan
42c710e4d1 lint pep8 2019-01-15 16:31:35 +00:00
Jeremy McMillan
15c6deba62 fix horrible mistakes 2019-01-15 16:31:35 +00:00
Jeremy McMillan
c092baf9da fix indentation doh 2019-01-15 16:31:35 +00:00
Jeremy McMillan
9080745e3a debug ipaddress.ip_address TypeError 2019-01-15 16:31:35 +00:00
Jeremy McMillan
8bd82f44e4 debug ipaddress.ip_address TypeError 2019-01-15 16:31:35 +00:00
Jeremy McMillan
080ab702c1 fix parse_host_port() parse error on hostname only arg 2019-01-15 16:31:35 +00:00
Jeremy McMillan
571603c4ce coverage for master host:port ipv4 and ipv6 config value support
fix test_parse_host_port bad values
lint
2019-01-15 16:31:35 +00:00
Jeremy McMillan
f14ff16626 fix minion zmq connecting to master configured as IPv6 address 2019-01-15 16:31:35 +00:00
Jeremy McMillan
9d72f13cac pylint E741 triggers error in salt-pylint E8741 (unhandled) 2019-01-15 16:31:35 +00:00
Jeremy McMillan
2052838a4d avoid error on (redundant) is_ip check 2019-01-15 16:31:35 +00:00
Jeremy McMillan
0eaeb1ed13 avoid error on (redundant) is_ip check 2019-01-15 16:31:35 +00:00
Jeremy McMillan
f8bd08e6f2 fix parse_host_port() is_ip call 2019-01-15 16:31:35 +00:00
Jeremy McMillan
89519fea0b fix parse_host_port() parse error on hostname only arg 2019-01-15 16:31:35 +00:00
Jeremy McMillan
1417528f57 fix parse_host_port() bad exception on hostname only arg 2019-01-15 16:31:35 +00:00
Jeremy McMillan
194a024ed0 coverage for master host:port ipv4 and ipv6 config value support
fix test_parse_host_port bad values
lint
2019-01-15 16:31:35 +00:00
Jeremy McMillan
df7338809b fix minion zmq connecting to master configured as IPv6 address 2019-01-15 16:31:35 +00:00
Daniel Wozniak
06854cf541
Merge pull request #51147 from Ch3LL/merge-2018.3
[2018.3] Merge forward from 2017.7 to 2018.3
2019-01-14 19:05:50 -07:00
Gareth J. Greenaway
d39d8b720d
Merge branch '2018.3' into merge-2018.3 2019-01-14 14:48:44 -08:00
Gareth J. Greenaway
b79c09e5a3
Merge pull request #51161 from amendlik/long-hostname
Ignore exceptions when generating the minion ID
2019-01-14 14:47:54 -08:00
Gareth J. Greenaway
6fcc4ad4d5
Merge branch '2018.3' into long-hostname 2019-01-14 13:36:25 -08:00
Ch3LL
74edfd97f3
Fix pylint 2019-01-14 15:09:27 -05:00
Gareth J. Greenaway
14247345a6
Merge pull request #51159 from rkrieger/fix-issue-51067
Prevent crash by testing for 'manufacturer' in osdata on OpenBSD
2019-01-14 10:08:21 -08:00
Adam Mendlik
1a4e307c0d
Ignore exceptions when generating the minion ID
Fixes #51160
2019-01-13 20:44:11 -07:00
Rogier Krieger
1440ccfd96 Prevent crash by testing for 'manufacturer' in osdata on OpenBSD
Fixes issue #51067.
2019-01-13 17:19:23 +01:00
Daniel Wozniak
5e3732669b
Merge pull request #51146 from terminalmage/fix-vsphere-tuple-issue
Fix invalid assignment in vsphere module
2019-01-12 14:44:32 -07:00