Till Maas
f2e493cd75
Merge pull request #62 from tyll/fixes
...
Various minor fixes
2018-06-28 18:04:03 +02:00
Till Maas
488c59a5f5
Rename/symlink accidentally checked-in files
2018-06-28 16:55:37 +02:00
Till Maas
8cf13dbc22
tox.ini: Fix PYTHONPATH
2018-06-28 16:31:35 +02:00
Till Maas
fce335d79e
tests_ethernet: Use correct test IP range
2018-06-28 16:31:35 +02:00
Thomas Haller
5b9e1331f8
library: fix try-count handling in SysUtil.link_infos()
...
https://github.com/linux-system-roles/network/issues/61
2018-06-18 21:56:37 +02:00
Till Maas
ed1d30a53d
Merge pull request #60 from linux-system-roles/th/main-function
...
th/main-function
2018-06-11 20:15:29 +02:00
Till Maas
ec65f5c78e
Merge pull request #59 from tyll/fix_global_connections
...
Use proper connections attribute
2018-06-11 15:36:37 +02:00
Till Maas
70d3e9e96c
Merge pull request #58 from smasc/fix_autoconnect
...
Fix handling of autoconnect parameter
2018-06-11 15:36:15 +02:00
Thomas Haller
cf8522e5cc
library: move main code to explicit main() function
...
Without it, we unintentionally declared 3 global variables
(connections, cmd, run_env_ansible). This was not intended,
and results in possibly wrong behavior by accidentally using
the global variables.
2018-06-11 08:49:35 +02:00
Till Maas
63314aeb92
Use proper connections attribute
2018-06-08 21:35:31 +02:00
Shannon Mascarenhas
70e69226c1
Add test for disabling autoconnect
2018-05-30 08:25:25 -05:00
Shannon Mascarenhas
5b45f9bc46
Fix handling of autoconnect parameter
...
This fixes a bug in the `network_connections` module when using the
`initscripts` provider and encountering a connection with `autoconnect`
set to false. It fails to write any `ONBOOT=` line to the interface's
`ifcfg-*` file, which RHEL treats as equivalent to `ONBOOT=yes`.
This explicitly sets `ONBOOT` for all interfaces defined, instead of
relying on what RHEL considers its default value.
2018-05-29 12:52:02 -05:00
Till Maas
fd110a4deb
Merge pull request #51 from tyll/type_keyerror
...
Detect and fix keyerror
2018-05-25 20:36:02 +02:00
Till Maas
dd24f020a9
Handle undefined type attribute
...
This fixes this exception (issue #40 ):
[WARNING]: exception: Traceback (most recent call last): File
"/tmp/ansible_FfjjGk/ansible_module_network_connections.py", line 2812, in <module> cmd.run() File
"/tmp/ansible_FfjjGk/ansible_module_network_connections.py", line 2398, in run self.run_prepare() File
"/tmp/ansible_FfjjGk/ansible_module_network_connections.py", line 2653, in run_prepare if connection['type'] in [
'macvlan' ]: KeyError: 'type'
2018-05-25 19:52:10 +02:00
Till Maas
0fc1b5bbb5
Add test to remove Ethernet profile
2018-05-25 19:52:10 +02:00
Till Maas
598e487971
Only run tests with python2 or python3 binary
...
Also fail, when the tests did not run with at least one of them.
2018-05-25 19:51:09 +02:00
Till Maas
47c7b638f0
Test whether python commands can be executed
...
This changes the test to rely on whether the binaries are available
regardless of how they were installed or from which package.
2018-05-25 19:50:07 +02:00
Till Maas
baae5ab9f9
Merge pull request #50 from tyll/more_integration_tests
...
More integration tests
2018-05-25 13:17:09 +02:00
Till Maas
05ae9bbc1e
Remove .image-cache from .gitignore
...
It was used by an old version of the test harness
2018-05-24 15:15:38 +02:00
Till Maas
75784ea5ed
Install python{,3}-gobject-base if required
2018-05-24 15:14:04 +02:00
Till Maas
b01ab7fd50
Add integration test for Ethernet device
2018-05-24 15:14:04 +02:00
Till Maas
910f399665
Add helper scripts to get coverage data
2018-05-24 15:14:04 +02:00
Till Maas
640e11001e
Add examples to remove or take down a profile
2018-05-23 18:55:21 +02:00
Till Maas
ff2f35cb8a
Add helper tasks for integration tests
2018-05-23 18:55:21 +02:00
Till Maas
14e65ec6c5
Merge pull request #54 from tyll/sysutils
...
Fix exception on Python3 in _link_read_permaddress() and for sorting network connections
2018-05-23 18:54:19 +02:00
Till Maas
2185df2a81
Always run commands in C locale
2018-05-23 18:31:54 +02:00
Till Maas
791d271d0b
Use "is succeeded" instead of | succeeded
...
This removes this deprecation warning:
[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of
using `result|succeeded` instead use `result is succeeded`. This feature
will be removed in version 2.9. Deprecation warnings can be disabled by
setting deprecation_warnings=False in ansible.cfg.
2018-05-23 18:29:31 +02:00
Till Maas
0bb66af883
Add basic test for Utils.check_output()
2018-05-23 18:29:31 +02:00
Till Maas
83f2521d5e
Fix python3 missing "cmp" keyword for list.sort()
...
This fixes this exception on Python3:
TypeError: 'cmp' is an invalid keyword argument for this function
2018-05-23 18:29:31 +02:00
Till Maas
8157a89456
Install pygobject and NetworkManager-libnm if possible
...
This avoids skipping tests that require pygobject/libnm
2018-05-23 18:29:31 +02:00
Till Maas
fa13ea2388
Fix exception on Python3 in _link_read_permaddress
...
Bytestrings need to be decoded. Just use UTF-8 here, since everyone
should be using it. Also add a test case to catch this. The exception
was:
TypeError: cannot use a string pattern on a bytes-like object
2018-05-23 18:29:31 +02:00
Till Maas
b3341f50c0
Merge pull request #49 from tyll/py26-37
...
Run tests for python 2.6 and 3.7, too
2018-05-17 12:42:43 +02:00
Till Maas
7c51a71cf4
Run tests for python 2.6 and 3.7, too
2018-05-17 12:23:31 +02:00
pcahyna
9f00e45818
Merge pull request #46 from tyll/coveralls
...
Travis-CI + Coveralls + move of tests and restructuring of the roles subdirectory
2018-05-17 11:29:47 +02:00
Till Maas
8d014e7a1d
Update gitignore
2018-05-17 11:15:28 +02:00
Till Maas
3ad7589913
Add status badges
2018-05-17 11:15:28 +02:00
Till Maas
fb76fba61d
Add initial travis and coveralls support via tox
...
Do not run coveralls by default and do not run flake8 and pylint in
travis. They make it always fail at the moment.
2018-05-17 11:15:14 +02:00
Till Maas
8e6f1bf96b
Move unit tests to tests dir
2018-05-16 20:18:05 +02:00
Till Maas
3e6e536248
Avoid symlink loop and nonstandard top level roles directory - move to tests
2018-05-16 20:03:05 +02:00
Till Maas
4ead3cfea8
Move tests to /tests directory and rename to new naming scheme
...
Ansible Galaxy and
https://fedoraproject.org/wiki/CI/Standard_Test_Interface suggest to use
a /tests directory and a names matching test*.yml.
2018-05-16 19:48:23 +02:00
Till Maas
57a67a3785
Fix role symlink
2018-05-14 17:06:24 +02:00
Till Maas
af34b18b0f
Use common roles directory to detect loops
...
This helps pytest to detect a loop.
2018-05-14 16:53:39 +02:00
Till Maas
b3163cdf20
Test more boolean values
2018-05-14 16:53:39 +02:00
Till Maas
9528ab4cba
Use linux-system-roles.network as role name
2018-05-14 16:53:39 +02:00
Pavel Cahyna
08187ae624
Unset the executable bit on Ansible module.
...
Per the policy defined in https://docs.ansible.com/ansible/latest/dev_guide/testing/sanity/shebang.html .
(Some RPM checks
f7e8f73ead/f/brp-mangle-shebangs
do not like an executable script to have a #!/usr/bin/python shebang.)
2018-05-10 18:28:13 +02:00
Till Maas
b5143f8b44
Merge pull request #37 from tyll/dns_simpletest
...
Add unittest for single IPv4 DNS server
2018-04-12 21:31:26 +02:00
Till Maas
2c3fd58458
Merge pull request #36 from pcahyna/add0.4docs
...
Improved documentation, especially of the new options added in 0.4, and DNS.
2018-03-14 08:34:42 +01:00
Pavel Cahyna
5106cb67e8
doc: corrections from @tyll: among others, use yes/no for bools
2018-03-14 01:39:18 +01:00
Till Maas
168bd43629
Add unittest for single IPv4 DNS server
2018-03-13 16:15:35 +01:00
Till Maas
f0d0e0637b
Add SPDX-License-Identifier headers
2018-03-13 10:06:30 +01:00