ifcfg-rh: tests: align json team configuration format to jansson one

(cherry picked from commit 53821a4b13)
This commit is contained in:
Francesco Giudici 2017-11-13 18:33:34 +01:00
parent 5cbe512fd3
commit 000e02f56a
7 changed files with 14 additions and 12 deletions

View file

@ -1,6 +1,6 @@
CONNECTED_MODE=no
TYPE=InfiniBand
TEAM_PORT_CONFIG="{ \"inf1\": { \"prio\": -10, \"sticky\": true } }"
TEAM_PORT_CONFIG="{\"inf1\": {\"prio\": -10, \"sticky\": true}}"
NAME="Test Write Team Infiniband Port"
UUID=${UUID}
DEVICE=inf1

View file

@ -1,4 +1,4 @@
TEAM_PORT_CONFIG="{ \"p4p1\": { \"prio\": -10, \"sticky\": true } }"
TEAM_PORT_CONFIG="{\"p4p1\": {\"prio\": -10, \"sticky\": true}}"
NAME="Test Write Team Port"
UUID=${UUID}
ONBOOT=yes

View file

@ -2,5 +2,5 @@ DEVICE=team0
ONBOOT=no
DEVICETYPE=Team
BOOTPROTO=dhcp
TEAM_CONFIG="{ \"device\": \"team0\", \"link_watch\": { \"name\": \"ethtool\" } }"
TEAM_CONFIG="{\"device\": \"team0\", \"link_watch\": {\"name\": \"ethtool\"}}"

View file

@ -1,5 +1,5 @@
DEVICE=team0
ONBOOT=no
BOOTPROTO=dhcp
TEAM_CONFIG="{ \"device\": \"team0\", \"link_watch\": { \"name\": \"ethtool\" } }"
TEAM_CONFIG="{\"device\": \"team0\", \"link_watch\": {\"name\": \"ethtool\"}}"

View file

@ -1,5 +1,5 @@
TYPE=Ethernet
TEAM_PORT_CONFIG="{ \"p4p1\": { \"prio\": -10, \"sticky\": true } }"
TEAM_PORT_CONFIG="{\"p4p1\": {\"prio\": -10, \"sticky\": true}}"
DEVICE=p4p1
TEAM_MASTER=team0
DEVICETYPE=TeamPort

View file

@ -1,4 +1,4 @@
TYPE=Ethernet
TEAM_PORT_CONFIG="{ \"p4p1\": { \"prio\": -10, \"sticky\": true } }"
TEAM_PORT_CONFIG="{\"p4p1\": {\"prio\": -10, \"sticky\": true}}"
DEVICE=p4p1
TEAM_MASTER=team0

View file

@ -8695,7 +8695,7 @@ test_read_team_master (gconstpointer user_data)
NMConnection *connection;
NMSettingConnection *s_con;
NMSettingTeam *s_team;
const char *expected_config = "{ \"device\": \"team0\", \"link_watch\": { \"name\": \"ethtool\" } }";
const char *expected_config = "{\"device\": \"team0\", \"link_watch\": {\"name\": \"ethtool\"}}";
connection = _connection_from_file (PATH_NAME, NULL, TYPE_ETHERNET, NULL);
@ -8748,7 +8748,7 @@ test_write_team_master (void)
NMSettingWired *s_wired;
NMSettingIPConfig *s_ip4;
NMSettingIPConfig *s_ip6;
const char *expected_config = "{ \"device\": \"team0\", \"link_watch\": { \"name\": \"ethtool\" } }";
const char *expected_config = "{\"device\": \"team0\", \"link_watch\": {\"name\": \"ethtool\"}}";
shvarFile *f;
connection = nm_simple_connection_new ();
@ -8817,7 +8817,7 @@ test_read_team_port (gconstpointer user_data)
NMConnection *connection;
NMSettingConnection *s_con;
NMSettingTeamPort *s_team_port;
const char *expected_config = "{ \"p4p1\": { \"prio\": -10, \"sticky\": true } }";
const char *expected_config = "{\"p4p1\": {\"prio\": -10, \"sticky\": true}}";
connection = _connection_from_file (PATH_NAME, NULL, TYPE_ETHERNET, NULL);
@ -8842,7 +8842,7 @@ test_write_team_port (void)
NMSettingConnection *s_con;
NMSettingTeamPort *s_team_port;
NMSettingWired *s_wired;
const char *expected_config = "{ \"p4p1\": { \"prio\": -10, \"sticky\": true } }";
const char *expected_config = "{\"p4p1\": {\"prio\": -10, \"sticky\": true}}";
shvarFile *f;
connection = nm_simple_connection_new ();
@ -8897,7 +8897,7 @@ test_write_team_infiniband_port (void)
NMSettingConnection *s_con;
NMSettingTeamPort *s_team_port;
NMSettingInfiniband *s_inf;
const char *expected_config = "{ \"inf1\": { \"prio\": -10, \"sticky\": true } }";
const char *expected_config = "{\"inf1\": {\"prio\": -10, \"sticky\": true}}";
shvarFile *f;
connection = nm_simple_connection_new ();
@ -9258,7 +9258,9 @@ test_svUnescape (void)
V0 ("Bob outside LAN", NULL),
V1 ("x", "x"),
V1 ("'{ \"device\": \"team0\", \"link_watch\": { \"name\": \"ethtool\" } }'",
"{ \"device\": \"team0\", \"link_watch\": { \"name\": \"ethtool\" } }"),
"{ \"device\": \"team0\", \"link_watch\": { \"name\": \"ethtool\" } }"),
V1 ("'{\"device\": \"team0\", \"link_watch\": {\"name\": \"ethtool\"}}'",
"{\"device\": \"team0\", \"link_watch\": {\"name\": \"ethtool\"}}"),
V1 ("x\"\"b", "xb"),
V1 ("x\"c\"b", "xcb"),
V1 ("\"c\"b", "cb"),