Skip to content

Commit

Permalink
add more debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasyang2022 committed Oct 10, 2024
1 parent dad461c commit 7b3863d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/features/steps/behave_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ def write(self, __b) -> int:


def call(host: str, port: int, cmdline: str, user: typing.Optional[str] = None):
print(f'behave.call({host}, {port}')
subprocess.run(['ip', 'addr'])
subprocess.run(['cat', '/etc/resolv.conf'])
subprocess.run(['cat', '/etc/hosts'])
print(f'behave.call({host}, {port})')
family, type, proto, _, sockaddr = socket.getaddrinfo(host, port, type=socket.SOCK_STREAM)[0]
with socket.socket(family, type, proto) as s:
s.connect(sockaddr)
Expand Down

0 comments on commit 7b3863d

Please sign in to comment.