Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nginx Ldap Auth
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Nginx Ldap Auth
Commits
a3a04fac
Commit
a3a04fac
authored
Oct 31, 2019
by
Vladimir Homutov
Browse files
Options
Downloads
Patches
Plain Diff
Python 3 support for the testsuite
parent
b5eca063
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Dockerfile.test
+2
-1
2 additions, 1 deletion
Dockerfile.test
t/README
+6
-1
6 additions, 1 deletion
t/README
t/ldap-auth.t
+1
-1
1 addition, 1 deletion
t/ldap-auth.t
t/runtests.sh
+1
-1
1 addition, 1 deletion
t/runtests.sh
with
10 additions
and
4 deletions
Dockerfile.test
+
2
−
1
View file @
a3a04fac
FROM
python
:
2
-
alpine
ARG
PYTHON_VERSION
=
2
FROM
python
:
$
{
PYTHON_VERSION
}
-
alpine
WORKDIR
/
usr
/
src
/
app
/
COPY
nginx
-
ldap
-
auth
-
daemon
.
py
/
usr
/
src
/
app
/
...
...
This diff is collapsed.
Click to expand it.
t/README
+
6
−
1
View file @
a3a04fac
To run tests use supplied Dockerfile.test:
docker build -f Dockerfile.test -t my-tag .
docker build -f Dockerfile.test -t my-tag
If you desire to use a container with Python3, you can supply an appropriate
build argument:
docker build -f Dockerfile.test -t my-tag --build-arg PYTHON_VERSION=3 .
docker run my-tag
To run without Docker:
...
...
This diff is collapsed.
Click to expand it.
t/ldap-auth.t
+
1
−
1
View file @
a3a04fac
...
...
@@ -433,7 +433,7 @@ system("ldapadd -H ldap://127.0.0.1:$p5 -x -D \"cn=root,ou=Users,dc=test,dc=loca
$t
->
write_file_expand
("
auth_daemon.sh
",
<<
"
EOF
");
AUTHBIN
=\
$
(
realpath
$AUTHD
)
cd
$d
exec
coverage
2
run
\
$AUTHBIN
--
host
127.0.0.1
\\
exec
coverage
run
\
$AUTHBIN
--
host
127.0.0.1
\\
-
p
%%PORT_8888
%%
>
$d
/
nginx
-
ldap
-
auth
-
dameon
.
stdlog
2
>&
1
EOF
...
...
This diff is collapsed.
Click to expand it.
t/runtests.sh
+
1
−
1
View file @
a3a04fac
...
...
@@ -10,4 +10,4 @@ perl ldap-auth.t
testdir
=
$(
find /tmp
-name
'nginx-test-*'
-print
-quit
)
cd
$testdir
coverage
2
html
&&
printf
"Coverage report: docker cp <cid>:
$testdir
/htmlcov <hostdir>
\n
"
coverage html
&&
printf
"Coverage report: docker cp <cid>:
$testdir
/htmlcov <hostdir>
\n
"
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