|
33 | 33 | shell: bash
|
34 | 34 | run: python -c "import sys; print(sys.version)"
|
35 | 35 |
|
| 36 | + - name: "Setup /etc/hosts for Linux" |
| 37 | + shell: bash |
| 38 | + run: | |
| 39 | + if [ `uname` = "Linux" ]; then |
| 40 | + echo "\$ cat /etc/hosts" |
| 41 | + cat /etc/hosts |
| 42 | + echo |
| 43 | + ( |
| 44 | + echo "127.0.0.1 localhost"; |
| 45 | + echo "::1 localhost ip6-localhost ip6-loopback"; |
| 46 | + ) | sudo tee /etc/hosts |
| 47 | + echo |
| 48 | + echo "\$ cat /etc/hosts" |
| 49 | + cat /etc/hosts |
| 50 | + fi |
| 51 | +
|
| 52 | + - name: Resolve localhost |
| 53 | + shell: bash |
| 54 | + run: | |
| 55 | + echo |
| 56 | + echo "\$ host localost" |
| 57 | + host localhost || true |
| 58 | + echo |
| 59 | + echo "\$ python -c 'import socket;print(socket.gethostbyname(\"localhost\"))'" |
| 60 | + python -c 'import socket;print(socket.gethostbyname("localhost"))' || true |
| 61 | + echo |
| 62 | + echo "\$ python -c 'import socket;print(socket.getaddrinfo(\"localhost\", None))'" |
| 63 | + python -c 'import socket;print(socket.getaddrinfo("localhost", None))' || true |
| 64 | + echo |
| 65 | + echo "\$ python -c 'import socket;print(socket.getaddrinfo(\"localhost\", None, socket.AF_INET))'" |
| 66 | + python -c 'import socket;print(socket.getaddrinfo("localhost", None, socket.AF_INET))' || true |
| 67 | + echo |
| 68 | + echo "\$ python -c 'import socket;print(socket.getaddrinfo(\"localhost\", None, socket.AF_INET6))'" |
| 69 | + python -c 'import socket;print(socket.getaddrinfo("localhost", None, socket.AF_INET6))' || true |
| 70 | +
|
| 71 | +
|
36 | 72 | # ------------------------------------------------------------
|
37 | 73 | # Tests: Behaviour (Client)
|
38 | 74 | # ------------------------------------------------------------
|
|
0 commit comments