Skip to content

Commit 8e7b778

Browse files
committed
chore(testfw): single constatnt for server address
1 parent 67a66e4 commit 8e7b778

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/test.ino

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Sketch for running InfluxDBClient tests.
33
* For compiling in VSCode add path to workspace ("${workspaceFolder}\\**")
44
* Most of the tests require running mock server: cd test/server & node server.js. It will print ip adresses of available network interfaces.
5-
* Modify INFLUXDB_CLIENT_MANAGEMENT_URL and INFLUXDB_CLIENT_TESTING_URL macros to set the correct mock server address.
5+
* Modify INFLUXDB_CLIENT_TESTING_SERVER_HOST to set the correct mock server address.
66
*
77
*/
88

@@ -15,8 +15,7 @@
1515
#include <ESP8266WiFi.h>
1616
#endif
1717

18-
#define INFLUXDB_CLIENT_MANAGEMENT_URL "http://192.168.88.142:998"
19-
#define INFLUXDB_CLIENT_TESTING_URL "http://192.168.88.142:999"
18+
#define INFLUXDB_CLIENT_TESTING_SERVER_HOST "192.168.88.142"
2019
#define INFLUXDB_CLIENT_TESTING_ORG "my-org"
2120
#define INFLUXDB_CLIENT_TESTING_BUC "my-bucket"
2221
#define INFLUXDB_CLIENT_TESTING_DB "my-db"
@@ -25,6 +24,10 @@
2524
#define INFLUXDB_CLIENT_TESTING_PASS "password"
2625

2726
#include "customSettings.h"
27+
28+
#define INFLUXDB_CLIENT_MANAGEMENT_URL "http://" INFLUXDB_CLIENT_TESTING_SERVER_HOST ":998"
29+
#define INFLUXDB_CLIENT_TESTING_URL "http://" INFLUXDB_CLIENT_TESTING_SERVER_HOST ":999"
30+
2831
#include "TestSupport.h"
2932
#include "Test.h"
3033

0 commit comments

Comments
 (0)