Skip to content

Commit

Permalink
tests: Fix the line endings for the SASL alt-auth tests
Browse files Browse the repository at this point in the history
- Change data and protocol sections to CRLF line endings.

Prior to this change the tests would fail or hang, which is because
certain sections such as protocol require CRLF line endings.

Follow-up to grandparent commit which added the tests.

Ref: curl#3653
Ref: curl#3790

NOTE: This commit was cherry-picked and is part of a series of commits
that added the authzid feature for upcoming 7.66.0. The series was
temporarily reverted in db8ec1f so that it would not ship in a 7.65.x
patch release.

Closes #xxxx
  • Loading branch information
jay committed Aug 2, 2019
1 parent f9e8795 commit fd8178d
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 44 deletions.
26 changes: 13 additions & 13 deletions tests/data/test848
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ REPLY AUTHENTICATE +
REPLY c2hhcmVkLW1haWxib3gAdXNlcgBzZWNyZXQ= A002 OK AUTHENTICATE completed
</servercmd>
<data>
From: me@somewhere
To: fake@nowhere

body

--
yours sincerely
From: me@somewhere
To: fake@nowhere
body
--
yours sincerely
</data>
</reply>

Expand All @@ -45,12 +45,12 @@ IMAP plain authentication with alternative authorization identity
# Verify data after the test has been "shot"
<verify>
<protocol>
A001 CAPABILITY
A002 AUTHENTICATE PLAIN
c2hhcmVkLW1haWxib3gAdXNlcgBzZWNyZXQ=
A003 SELECT 848
A004 FETCH 1 BODY[]
A005 LOGOUT
A001 CAPABILITY
A002 AUTHENTICATE PLAIN
c2hhcmVkLW1haWxib3gAdXNlcgBzZWNyZXQ=
A003 SELECT 848
A004 FETCH 1 BODY[]
A005 LOGOUT
</protocol>
</verify>
</testcase>
6 changes: 3 additions & 3 deletions tests/data/test849
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ IMAP plain authentication with alternative authorization identity (Not authorize
# The multi interface considers a broken "CONNECT" as a prematurely broken
# transfer and such a connection will not get a "LOGOUT"
<protocol>
A001 CAPABILITY
A002 AUTHENTICATE PLAIN
dXJzZWwAa3VydAB4aXBqM3BsbXE=
A001 CAPABILITY
A002 AUTHENTICATE PLAIN
dXJzZWwAa3VydAB4aXBqM3BsbXE=
</protocol>
</verify>
</testcase>
24 changes: 12 additions & 12 deletions tests/data/test892
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ REPLY AUTH +
REPLY c2hhcmVkLW1haWxib3gAdXNlcgBzZWNyZXQ= +OK Login successful
</servercmd>
<data>
From: me@somewhere
To: fake@nowhere

body

--
yours sincerely
From: me@somewhere
To: fake@nowhere
body
--
yours sincerely
</data>
</reply>

Expand All @@ -47,11 +47,11 @@ pop3://%HOSTIP:%POP3PORT/892 -u user:secret --sasl-authzid shared-mailbox
# Verify data after the test has been "shot"
<verify>
<protocol>
CAPA
AUTH PLAIN
c2hhcmVkLW1haWxib3gAdXNlcgBzZWNyZXQ=
RETR 892
QUIT
CAPA
AUTH PLAIN
c2hhcmVkLW1haWxib3gAdXNlcgBzZWNyZXQ=
RETR 892
QUIT
</protocol>
</verify>
</testcase>
6 changes: 3 additions & 3 deletions tests/data/test893
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ pop3://%HOSTIP:%POP3PORT/893 -u kurt:xipj3plmq --sasl-authzid ursel
# The multi interface considers a broken "CONNECT" as a prematurely broken
# transfer and such a connection will not get a "QUIT"
<protocol>
CAPA
AUTH PLAIN
dXJzZWwAa3VydAB4aXBqM3BsbXE=
CAPA
AUTH PLAIN
dXJzZWwAa3VydAB4aXBqM3BsbXE=
</protocol>
</verify>
</testcase>
20 changes: 10 additions & 10 deletions tests/data/test953
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ smtp
SMTP plain authentication with alternative authorization identity
</name>
<stdin>
mail body
mail body
</stdin>
<command>
smtp://%HOSTIP:%SMTPPORT/953 --mail-rcpt recipient@example.com --mail-from sender@example.com -u kurt:xipj3plmq --sasl-authzid ursel -T -
Expand All @@ -40,17 +40,17 @@ smtp://%HOSTIP:%SMTPPORT/953 --mail-rcpt recipient@example.com --mail-from sende
# Verify data after the test has been "shot"
<verify>
<protocol>
EHLO 953
AUTH PLAIN
dXJzZWwAa3VydAB4aXBqM3BsbXE=
MAIL FROM:<sender@example.com>
RCPT TO:<recipient@example.com>
DATA
QUIT
EHLO 953
AUTH PLAIN
dXJzZWwAa3VydAB4aXBqM3BsbXE=
MAIL FROM:<sender@example.com>
RCPT TO:<recipient@example.com>
DATA
QUIT
</protocol>
<upload>
mail body
.
mail body
.
</upload>
</verify>
</testcase>
6 changes: 3 additions & 3 deletions tests/data/test954
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ smtp://%HOSTIP:%SMTPPORT/954 --mail-rcpt recipient@example.com --mail-from sende
# The multi interface considers a broken "CONNECT" as a prematurely broken
# transfer and such a connection will not get a "QUIT"
<protocol>
EHLO 954
AUTH PLAIN
dXJzZWwAa3VydAB4aXBqM3BsbXE=
EHLO 954
AUTH PLAIN
dXJzZWwAa3VydAB4aXBqM3BsbXE=
</protocol>
</verify>
</testcase>

0 comments on commit fd8178d

Please sign in to comment.