Skip to content

Commit

Permalink
Avoid Temporary failure in name resolution.
Browse files Browse the repository at this point in the history
Addressing failure on local Fedora 34 host
======================================================================
FAIL: test1_session_host (t2_session.SessionTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/src/tests/t2_session.py", line 21, in test1_session_host
    self.assertEqual(str(cm.exception), "Failed to resolve hostname unknown-localhost (Name or service not known)")
AssertionError: 'Fail[17 chars]tname unknown-localhost (Temporary failure in name resolution)' != 'Fail[17 chars]tname unknown-localhost (Name or service not known)'
- Failed to resolve hostname unknown-localhost (Temporary failure in name resolution)
+ Failed to resolve hostname unknown-localhost (Name or service not known)

----------------------------------------------------------------------
Ran 13 tests in 8.361s

FAILED (failures=1)
  • Loading branch information
adelton committed May 8, 2021
1 parent 8f01674 commit 1cf2298
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM registry.fedoraproject.org/fedora
RUN dnf install -y --setopt=install_weak_deps=False python3-devel python3-Cython make gcc libssh-devel openssh-server openssh-clients rpm-build
RUN grep hosts: /etc/nsswitch.conf && sed -i 's/^hosts:.*/hosts: files dns myhostname/' /etc/nsswitch.conf
RUN for i in rsa ecdsa ed25519 ; do /usr/libexec/openssh/sshd-keygen $i ; done
RUN mkdir ~/.ssh && echo localhost $( cat /etc/ssh/ssh_host_ecdsa_key.pub ) > ~/.ssh/known_hosts
RUN yes | ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
Expand Down

0 comments on commit 1cf2298

Please sign in to comment.