summaryrefslogtreecommitdiff
path: root/tests/data/test844
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-08-04 13:56:12 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-08-04 18:12:42 +0200
commit424092e70f4c83e32d16bdbb1316526c10e57139 (patch)
tree043648770106b672ab1c27b885a240e7994448f0 /tests/data/test844
parentca222824f36be93effd56528f7590bfb05a829f0 (diff)
downloadcurl-424092e70f4c83e32d16bdbb1316526c10e57139.tar.gz
runtests: support dynamicly base64 encoded sections in tests
This allows us to make test cases to use base64 at run-time and still use and verify information determined at run-time, such as the IMAP test server's port number in test 842. This change makes 12 tests run again that basically never ran since we moved to dynamic port numbers. ftpserver.pl is adjusted to load test instructions and test number from the preprocessed test file. FILEFORMAT.md now documents the new base64 encoding syntax. Reported-by: Marcel Raad Fixes #5761 Closes #5775
Diffstat (limited to 'tests/data/test844')
-rw-r--r--tests/data/test84412
1 files changed, 2 insertions, 10 deletions
diff --git a/tests/data/test844 b/tests/data/test844
index c5093d2b8..8573bc2fd 100644
--- a/tests/data/test844
+++ b/tests/data/test844
@@ -15,9 +15,7 @@ RFC7628
<servercmd>
AUTH OAUTHBEARER
REPLY AUTHENTICATE +
-REPLY bixhPXVzZXIsAWhvc3Q9MTI3LjAuMC4xAXBvcnQ9OTAwMwFhdXRoPUJlYXJlciBtRl85LkI1Zi00LjFKcU0BAQ== +
-eyJzdGF0dXMiOiJpbnZhbGlkX3Rva2VuIiwic2NvcGUiOiJleGFtcGxlX3Njb3BlIiwib3BlbmlkLWNvbmZpZ3VyYXRpb24iOiJodHRwczovL2V4YW1wbGUuY29tLy53ZWxsLWtub3duL29wZW5pZC1jb25maWd1cmF0aW9uIn0=
-REPLY AQ== A002 NO Authentication failed
+REPLY %b64[n,a=user,%01host=127.0.0.1%01port=%IMAPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64% A002 NO Authentication failed
</servercmd>
</reply>
@@ -33,11 +31,6 @@ IMAP OAuth 2.0 (OAUTHBEARER) failure as continuation
<command>
'imap://%HOSTIP:%IMAPPORT/844/;MAILINDEX=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
</command>
-# The protocol section doesn't support ways of specifying the raw data in the
-# base64 encoded message so we must assert this
-<precheck>
-perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%IMAPPORT' ne '9003' );"
-</precheck>
</client>
#
@@ -53,8 +46,7 @@ perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP'
<protocol>
A001 CAPABILITY
A002 AUTHENTICATE OAUTHBEARER
-bixhPXVzZXIsAWhvc3Q9MTI3LjAuMC4xAXBvcnQ9OTAwMwFhdXRoPUJlYXJlciBtRl85LkI1Zi00LjFKcU0BAQ==
-AQ==
+%b64[n,a=user,%01host=127.0.0.1%01port=%IMAPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64%
</protocol>
</verify>
</testcase>