mirror of
https://github.com/curl/curl.git
synced 2025-09-11 14:42:40 +03:00
tests: introduce %CLIENT6IP-NB
This is the %CLIENT6IP variable - but without outmost brackets since some commmand lines need the address without the brackets. With this variable we can run three more tests without prechecks. Closes #15039
This commit is contained in:
parent
7aa2b4e01f
commit
5fb1b64fdd
|
@ -121,7 +121,8 @@ replaced by their content at that time.
|
|||
|
||||
Available substitute variables include:
|
||||
|
||||
- `%CLIENT6IP` - IPv6 address of the client running curl
|
||||
- `%CLIENT6IP` - IPv6 address of the client running curl (including brackets)
|
||||
- `%CLIENT6IP-NB` - IPv6 address of the client running curl (no brackets)
|
||||
- `%CLIENTIP` - IPv4 address of the client running curl
|
||||
- `%CURL` - Path to the curl executable
|
||||
- `%DATE` - current YYYY-MM-DD date
|
||||
|
|
|
@ -36,12 +36,8 @@ http-ipv6
|
|||
HTTP-IPv6 GET with numeric localhost --interface
|
||||
</name>
|
||||
<command>
|
||||
-g "http://%HOST6IP:%HTTP6PORT/%TESTNUMBER" --interface ::1
|
||||
-g "http://%HOST6IP:%HTTP6PORT/%TESTNUMBER" --interface %CLIENT6IP-NB
|
||||
</command>
|
||||
# --interface doesn't accept an address surrounded by [] so %CLIENT6IP is out
|
||||
<precheck>
|
||||
perl -e "print 'Test requires default test client host address' if ( '%CLIENT6IP' ne '[::1]' );"
|
||||
</precheck>
|
||||
</client>
|
||||
|
||||
#
|
||||
|
|
|
@ -41,12 +41,8 @@ ftp-ipv6
|
|||
FTP-IPv6 dir list PASV with localhost --interface
|
||||
</name>
|
||||
<command>
|
||||
-g "ftp://%HOST6IP:%FTP6PORT/" --interface ::1
|
||||
-g "ftp://%HOST6IP:%FTP6PORT/" --interface %CLIENT6IP-NB
|
||||
</command>
|
||||
# --interface doesn't accept an address surrounded by [] so %CLIENT6IP is out
|
||||
<precheck>
|
||||
perl -e "print 'Test requires default test client host address' if ( '%CLIENT6IP' ne '[::1]' );"
|
||||
</precheck>
|
||||
</client>
|
||||
|
||||
#
|
||||
|
|
|
@ -38,12 +38,8 @@ ftp-ipv6
|
|||
FTP-IPv6 dir list, EPRT with specified IP
|
||||
</name>
|
||||
<command>
|
||||
-g "ftp://%HOST6IP:%FTP6PORT/" -P ::1
|
||||
-g "ftp://%HOST6IP:%FTP6PORT/" -P %CLIENT6IP-NB
|
||||
</command>
|
||||
# --interface doesn't accept an address surrounded by [] so %CLIENT6IP is out
|
||||
<precheck>
|
||||
perl -e "print 'Test requires default test client host address' if ( '%CLIENT6IP' ne '[::1]' );"
|
||||
</precheck>
|
||||
</client>
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
|
|
|
@ -2990,6 +2990,10 @@ sub subvariables {
|
|||
$$thing =~ s/${prefix}SOCKSUNIXPATH/$SOCKSUNIXPATH/g;
|
||||
|
||||
# client IP addresses
|
||||
my $nb = $CLIENT6IP;
|
||||
$nb =~ s/^\[(.*)\]/$1/; # trim off the brackets
|
||||
|
||||
$$thing =~ s/${prefix}CLIENT6IP-NB/$nb/g;
|
||||
$$thing =~ s/${prefix}CLIENT6IP/$CLIENT6IP/g;
|
||||
$$thing =~ s/${prefix}CLIENTIP/$CLIENTIP/g;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user