Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit fd6c0a4

Browse files
committed
fix inet dns test
1 parent c5ae123 commit fd6c0a4

File tree

3 files changed

+34
-3
lines changed

3 files changed

+34
-3
lines changed

src/test-apps/happy/tests/standalone/inet/test_inet_dns_01.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ class test_inet_dns(unittest.TestCase):
4040
def setUp(self):
4141
if "WEAVE_SYSTEM_CONFIG_USE_LWIP" in os.environ.keys() and os.environ["WEAVE_SYSTEM_CONFIG_USE_LWIP"] == "1":
4242
self.using_lwip = True
43+
topology_shell_script = os.path.dirname(os.path.realpath(__file__)) + \
44+
"/topology/two_nodes_on_tap_wifi.sh"
4345
else:
4446
self.using_lwip = False
47+
topology_shell_script = os.path.dirname(os.path.realpath(__file__)) + \
48+
"/topology/two_nodes_wifi.sh"
4549

46-
topology_shell_script = os.path.dirname(os.path.realpath(__file__)) + \
47-
"/topology/two_nodes_on_tap_wifi.sh"
4850
output = subprocess.call([topology_shell_script])
4951

5052
def tearDown(self):

src/test-apps/happy/tests/standalone/inet/topology/two_nodes_on_tap_wifi.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,4 @@ happy-node-add node01
2626
happy-node-add --ap onhub
2727
happy-node-join onhub Home
2828
happy-node-join --tap node01 Home
29-
happy-network-route --prefix 10.0.1.0 Home onhub
3029
happy-internet --node onhub --interface ${IFACE} --isp ${IFACE//[0-9]/} --seed 249
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
#
4+
# Copyright (c) 2017 Nest Labs, Inc.
5+
# All rights reserved.
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
20+
# Steps to manually build 2 nodes happy topology for dns resolution test
21+
IFACE=$(route | grep '^default' | grep -o '[^ ]*$')
22+
happy-state-delete
23+
happy-network-add Home wifi
24+
happy-network-address --id Home --add 10.0.1.0
25+
happy-node-add node01
26+
happy-node-add --ap onhub
27+
happy-node-join onhub Home
28+
happy-node-join node01 Home
29+
happy-network-route --prefix 10.0.1.0 Home onhub
30+
happy-internet --node onhub --interface ${IFACE} --isp ${IFACE//[0-9]/} --seed 249

0 commit comments

Comments
 (0)