Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration test for ipv6. #2083

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions bin/test/test_integ.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ if [[ "$(uname -s)" = "Linux*" ]]; then
fi
fi

if [[ "$(uname -s)" = "Darwin" ]]; then
echo ">>>>>>>>>>>>>>>>>>>"
/usr/local/opt/curl/bin/curl --version
/usr/bin/curl --version
hurl --version
/usr/local/opt/curl/bin/curl --ipv6 --verbose https://google.com
/usr/bin/curl --ipv6 --verbose https://google.com
echo 'GET https://google.com' | hurl --ipv6 --very-verbose
echo ">>>>>>>>>>>>>>>>>>>"
fi

# integration tests
cd integration
Expand Down
8 changes: 8 additions & 0 deletions integration/tests_ok/ip.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<pre><code class="language-hurl"><span class="hurl-entry"><span class="request"><span class="line"><span class="method">GET</span> <span class="url">https://google.com</span></span>
<span class="line"><span class="section-header">[Options]</span></span>
<span class="line"><span class="string">ipv4</span>: <span class="boolean">true</span></span>
</span></span><span class="hurl-entry"><span class="request"><span class="line"></span>
<span class="line"><span class="method">GET</span> <span class="url">https://google.com</span></span>
<span class="line"><span class="section-header">[Options]</span></span>
<span class="line"><span class="string">ipv6</span>: <span class="boolean">true</span></span>
</span></span></code></pre>
7 changes: 7 additions & 0 deletions integration/tests_ok/ip.hurl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
GET https://google.com
[Options]
ipv4: true

GET https://google.com
[Options]
ipv6: true
1 change: 1 addition & 0 deletions integration/tests_ok/ip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"entries":[{"request":{"method":"GET","url":"https://google.com","options":[{"name":"ipv4","value":true}]}},{"request":{"method":"GET","url":"https://google.com","options":[{"name":"ipv6","value":true}]}}]}
2 changes: 2 additions & 0 deletions integration/tests_ok/ip.out.pattern
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Connected to google.com (~~~.~~~.~~~.~~~) port 443 (#0)
Connected to google.com (~~~~:~~~~:~~~~:~~~::~~~~) port 443 (#1)
5 changes: 5 additions & 0 deletions integration/tests_ok/ip.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Set-StrictMode -Version latest
$ErrorActionPreference = 'Stop'
# GitHub runners only support IPV6 on macOS so we skip other OS (for the moment).
exit 255
hurl --very-verbose tests_ok/ip.hurl 2>&1 | grep 'Connected to google.com' | sed 's/^** //'
29 changes: 0 additions & 29 deletions integration/tests_ok/ip.py

This file was deleted.

9 changes: 9 additions & 0 deletions integration/tests_ok/ip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
set -Eeuo pipefail

# GitHub runners only support IPV6 on macOS so we skip other OS (for the moment).
if [[ "$(uname -s)" = "Linux" ]]; then
exit 255
fi

hurl --very-verbose tests_ok/ip.hurl 2>&1 | grep 'Connected to google.com' | sed 's/^** //'
Loading