Commit Graph

4 Commits

Author SHA1 Message Date
Thomas Haller
a473ab431a cli: refactor team-link-watcher to/from strings
Stricter parsing of the string:

- reject attributes that don't make sense depending on the type.

- reject duplicate attributes.
2019-04-25 07:50:47 +02:00
Thomas Haller
2800574221 shared: fix to/from string of vlanid and missed-max values for NMTeamLinkWatcher
The vlanid and missed-max values have non-zero default values.
That is what nm_utils_team_link_watcher_from_string() honors.

Note that nm_utils_team_link_watcher_to_string() must omit printing
the value only if it's the default value too.

Otherwise, these values are not preserved during a to string conversion
and back.

Maybe a better fix would be to always print the values, regardless of
the default value. But arguably, that is quite ugly because in most
cases we don't want to cluter the string output with values that are
left at the default.
2019-04-25 07:49:56 +02:00
Thomas Haller
2aa81edeaf shared/tests: add test for NMTeamLinkWatcher to/from string 2019-04-25 07:49:56 +02:00
Thomas Haller
7a25f67af7 shared/tests: add tests for libnm-core-aux
These tests cannot (easily) be under "shared/nm-libnm-core-aux/tests"
because libnm/libnm-core requires code under shared while
"nm-libnm-core-aux" requires libnm/libnm-core. With autotools that is
not problem, but with meson we include sub directories in a particular
order and there is no way to foward declare stuff (AFAIK). To avoid
the circular dependency, add the tests to "clients/common/tests", which
is always built last.
2019-04-25 07:47:37 +02:00