Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CentOS functional tests
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
linuxsupport
Testing
CentOS functional tests
Commits
d766ac1c
Unverified
Commit
d766ac1c
authored
4 years ago
by
Fabian Arrotin
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Revert "nc option -i/-d is unnecessary"
parent
50c71fd7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/p_dovecot/dovecot_imap_login.sh
+10
-2
10 additions, 2 deletions
tests/p_dovecot/dovecot_imap_login.sh
tests/p_dovecot/dovecot_pop3_login.sh
+10
-2
10 additions, 2 deletions
tests/p_dovecot/dovecot_pop3_login.sh
with
20 additions
and
4 deletions
tests/p_dovecot/dovecot_imap_login.sh
+
10
−
2
View file @
d766ac1c
...
...
@@ -7,14 +7,22 @@ t_Log "Running $0 - adding imaptest local user account + attempting IMAP login"
{
userdel
-rf
imaptest
;
useradd imaptest
&&
echo
imaptest | passwd
--stdin
imaptest
;
}
&>/dev/null
# creating maildir in HOME, else test will fail at first try
mkdir
-m
700
-p
/home/imaptest/mail/.imap/INBOX
mkdir
-m
700
-p
/home/imaptest/mail/.imap/INBOX
chown
-R
imaptest:imaptest /home/imaptest/mail
ret_val
=
1
t_Log
"Dovecot IMAP login test"
echo
-e
"01 LOGIN imaptest imaptest
\n
"
| nc
-w
5 localhost 143 |
grep
-q
"Logged in."
# EL7 comes with nmap-nc , different from nc so different options to use
if
[
"
$centos_ver
"
-ge
7
]
;
then
nc_options
=
"-d 3 -w 5"
else
nc_options
=
"-i 3 -w 5"
fi
echo
-e
"01 LOGIN imaptest imaptest
\n
"
| nc
${
nc_options
}
localhost 143 |
grep
-q
"Logged in."
ret_val
=
$?
...
...
This diff is collapsed.
Click to expand it.
tests/p_dovecot/dovecot_pop3_login.sh
+
10
−
2
View file @
d766ac1c
...
...
@@ -7,12 +7,20 @@ t_Log "Running $0 - adding pop3test local user account + attempting POP3 login"
{
userdel
-rf
pop3test
;
useradd pop3test
&&
echo
pop3test | passwd
--stdin
pop3test
;
}
&>/dev/null
# creating maildir in HOME, else test will fail at first try
mkdir
-m
700
-p
/home/pop3test/mail/.imap/INBOX
mkdir
-m
700
-p
/home/pop3test/mail/.imap/INBOX
chown
-R
pop3test:pop3test /home/pop3test/mail/.imap/INBOX
t_Log
"Dovecot POP3 login test"
# EL7 comes with nmap-nc , different from nc so different options to use
echo
-e
"user pop3test
\n
pass pop3test
\n
"
| nc
-w
5 localhost 110 |
grep
-q
"+OK Logged in."
if
[
"
$centos_ver
"
-ge
7
]
;
then
nc_options
=
"-d 3 -w 5"
else
nc_options
=
"-i 3 -w 5"
fi
echo
-e
"user pop3test
\n
pass pop3test
\n
"
| nc
${
nc_options
}
localhost 110 |
grep
-q
"+OK Logged in."
t_CheckExitStatus
$?
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment