Skip to content

Commit

Permalink
e2e - Fetch eth0 ip to find the current ip addr
Browse files Browse the repository at this point in the history
Change-Id: I8923514961680b84d581a48527d342187fddddd9
Reviewed-on: https://review.couchbase.org/c/testrunner/+/173396
Reviewed-by: <anitha.kuberan@couchbase.com>
Tested-by: Ashwin <ashwin.trojan@gmail.com>
  • Loading branch information
ashwin2002 committed Apr 7, 2022
1 parent c8eee46 commit 49e3c42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/deployE2E.py
Expand Up @@ -111,7 +111,7 @@ def deleteExistingDockerContainersOnHost(self):

def setHostIP(self):
if sys.platform.startswith("linux"): # could be "linux", "linux2", "linux3", ...
self.hostIP = os.popen('hostname -i').read().strip()
self.hostIP = os.popen('ifconfig eth0 | grep "inet " | xargs | cut -d" " -f 2').read().strip()
elif sys.platform == "darwin":
st = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
Expand Down

0 comments on commit 49e3c42

Please sign in to comment.