@@ 1281-1292 (lines=12) @@ | ||
1278 | assert status.OK() |
|
1279 | assert config_value == '127.0.0.1' |
|
1280 | ||
1281 | def test_set_port_valid(self, connect, collection): |
|
1282 | ''' |
|
1283 | target: set port |
|
1284 | method: call set_config correctly |
|
1285 | expected: status ok, set successfully |
|
1286 | ''' |
|
1287 | for valid_port in [1025, 65534, "19530", "9091"]: |
|
1288 | status, reply = connect.set_config("metric", "port", valid_port) |
|
1289 | assert status.OK() |
|
1290 | status, config_value = connect.get_config("metric", "port") |
|
1291 | assert status.OK() |
|
1292 | assert config_value == str(valid_port) |
|
1293 | ||
1294 | def test_set_port_invalid(self, connect, collection): |
|
1295 | ''' |
|
@@ 910-921 (lines=12) @@ | ||
907 | assert status.OK() |
|
908 | assert config_value == '0.0.0.0' |
|
909 | ||
910 | def test_set_port_valid(self, connect, collection): |
|
911 | ''' |
|
912 | target: set port |
|
913 | method: call set_config correctly |
|
914 | expected: status ok, set successfully |
|
915 | ''' |
|
916 | for valid_port in [1025, 65534, 12345, "19530"]: |
|
917 | status, reply = connect.set_config("network", "http.port", valid_port) |
|
918 | assert status.OK() |
|
919 | status, config_value = connect.get_config("network", "http.port") |
|
920 | assert status.OK() |
|
921 | assert config_value == str(valid_port) |
|
922 | ||
923 | def test_set_port_invalid(self, connect, collection): |
|
924 | ''' |