Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Jaak Ristioja
OpenLDAP
Commits
855b1e3a
Commit
855b1e3a
authored
20 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
add test for back-relay/rwm
parent
3fd4d041
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/scripts/test030-relay
+113
-0
113 additions, 0 deletions
tests/scripts/test030-relay
with
113 additions
and
0 deletions
tests/scripts/test030-relay
0 → 100755
+
113
−
0
View file @
855b1e3a
#! /bin/sh
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
## Copyright 1998-2004 The OpenLDAP Foundation.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted only as authorized by the OpenLDAP
## Public License.
##
## A copy of this license is available in the file LICENSE in the
## top-level directory of the distribution or, alternatively, at
## <http://www.OpenLDAP.org/license.html>.
echo
"running defines.sh"
.
$SRCDIR
/scripts/defines.sh
if
test
$BACKRELAY
=
relayno
;
then
echo
"relay backend not available, test skipped"
exit
0
fi
if
test
$RWM
=
rwmno
;
then
echo
"Rewrite/remap overlay not available, test skipped"
exit
0
fi
mkdir
-p
$TESTDIR
$DBDIR1
echo
"Starting slapd on TCP/IP port
$PORT1
..."
.
$CONFFILTER
$BACKEND
$MONITORDB
<
$RWMCONF
>
$CONF1
$SLAPD
-f
$CONF1
-h
$URI1
-d
$LVL
$TIMING
>
$LOG1
2>&1 &
PID
=
$!
if
test
$WAIT
!=
0
;
then
echo
PID
$PID
read
foo
fi
KILLPIDS
=
"
$PID
"
echo
"Using ldapsearch to check that slapd is running..."
for
i
in
0 1 2 3 4 5
;
do
$LDAPSEARCH
-s
base
-b
"
$MONITOR
"
-h
$LOCALHOST
-p
$PORT1
\
'objectclass=*'
>
/dev/null 2>&1
RC
=
$?
if
test
$RC
=
0
;
then
break
fi
echo
"Waiting 5 seconds for slapd to start..."
sleep
5
done
if
test
$RC
!=
0
;
then
echo
"ldapsearch failed
$(
RC
)
!"
test
$KILLSERVERS
!=
no
&&
kill
-HUP
$KILLPIDS
exit
$RC
fi
echo
"Using ldapadd to populate the database..."
$LDAPADD
-D
"
$MANAGERDN
"
-h
$LOCALHOST
-p
$PORT1
-w
$PASSWD
<
\
$LDIFORDERED
>
$TESTOUT
2>&1
RC
=
$?
if
test
$RC
!=
0
;
then
echo
"ldapadd failed (
$RC
)!"
test
$KILLSERVERS
!=
no
&&
kill
-HUP
$KILLPIDS
exit
$RC
fi
cat
/dev/null
>
$SEARCHOUT
BASEDN
=
"dc=example,dc=com"
echo
"searching base=
\"
$BASEDN
\"
..."
$LDAPSEARCH
-h
$LOCALHOST
-p
$PORT1
-b
"
$BASEDN
"
>>
$SEARCHOUT
2>&1
RC
=
$?
if
test
$RC
!=
0
;
then
echo
"Search failed (
$RC
)!"
test
$KILLSERVERS
!=
no
&&
kill
-HUP
$KILLPIDS
exit
$RC
fi
BASEDN
=
"o=Example,c=US"
echo
"searching base=
\"
$BASEDN
\"
..."
$LDAPSEARCH
-h
$LOCALHOST
-p
$PORT1
-b
"
$BASEDN
"
>>
$SEARCHOUT
2>&1
RC
=
$?
if
test
$RC
!=
0
;
then
echo
"Search failed (
$RC
)!"
test
$KILLSERVERS
!=
no
&&
kill
-HUP
$KILLPIDS
exit
$RC
fi
BASEDN
=
"o=Esempio,c=IT"
echo
"searching base=
\"
$BASEDN
\"
..."
$LDAPSEARCH
-h
$LOCALHOST
-p
$PORT1
-b
"
$BASEDN
"
>>
$SEARCHOUT
2>&1
RC
=
$?
if
test
$RC
!=
0
;
then
echo
"Search failed (
$RC
)!"
test
$KILLSERVERS
!=
no
&&
kill
-HUP
$KILLPIDS
exit
$RC
fi
BASEDN
=
"o=Beispiel,c=DE"
echo
"searching base=
\"
$BASEDN
\"
..."
$LDAPSEARCH
-h
$LOCALHOST
-p
$PORT1
-b
"
$BASEDN
"
>>
$SEARCHOUT
2>&1
RC
=
$?
if
test
$RC
!=
0
;
then
echo
"Search failed (
$RC
)!"
test
$KILLSERVERS
!=
no
&&
kill
-HUP
$KILLPIDS
exit
$RC
fi
test
$KILLSERVERS
!=
no
&&
kill
-HUP
$KILLPIDS
echo
">>>>> Test succeeded"
exit
0
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