Skip to content

Commit 61b8468

Browse files
committed
tests-netsocket-gethostbyname
MBED_DNS_TEST_HOST define is replaced by MBED_CONF_APP_DNS_TEST_HOST to allow user to change host name for local tests
1 parent 2e1c2a1 commit 61b8468

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

TESTS/netsocket/gethostbyname/main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ using namespace utest::v1;
2929

3030
// Hostname for testing against
3131
// Must have A and AAAA records
32-
#ifndef MBED_DNS_TEST_HOST
33-
#define MBED_DNS_TEST_HOST "connector.mbed.com"
32+
#ifndef MBED_CONF_APP_DNS_TEST_HOST
33+
#define MBED_CONF_APP_DNS_TEST_HOST "connector.mbed.com"
3434
#endif
3535

3636

@@ -59,9 +59,9 @@ void net_bringup() {
5959
// DNS tests
6060
void test_dns_query() {
6161
SocketAddress addr;
62-
int err = net->gethostbyname(MBED_DNS_TEST_HOST, &addr);
62+
int err = net->gethostbyname(MBED_CONF_APP_DNS_TEST_HOST, &addr);
6363
printf("DNS: query \"%s\" => \"%s\"\n",
64-
MBED_DNS_TEST_HOST, addr.get_ip_address());
64+
MBED_CONF_APP_DNS_TEST_HOST, addr.get_ip_address());
6565

6666
TEST_ASSERT_EQUAL(0, err);
6767
TEST_ASSERT((bool)addr);
@@ -70,9 +70,9 @@ void test_dns_query() {
7070

7171
void test_dns_query_pref() {
7272
SocketAddress addr;
73-
int err = net->gethostbyname(MBED_DNS_TEST_HOST, &addr, ip_pref);
73+
int err = net->gethostbyname(MBED_CONF_APP_DNS_TEST_HOST, &addr, ip_pref);
7474
printf("DNS: query %s \"%s\" => \"%s\"\n",
75-
ip_pref_repr, MBED_DNS_TEST_HOST, addr.get_ip_address());
75+
ip_pref_repr, MBED_CONF_APP_DNS_TEST_HOST, addr.get_ip_address());
7676

7777
TEST_ASSERT_EQUAL(0, err);
7878
TEST_ASSERT((bool)addr);

0 commit comments

Comments
 (0)