Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sso
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
ai
sso
Commits
61c812fd
Commit
61c812fd
authored
3 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Try a different DUMP_LOG method
parent
cedfbb3e
No related branches found
No related tags found
1 merge request
!4
Drop Python 2 support
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mod_sso/test/httpd_integration_test.py
+7
-4
7 additions, 4 deletions
src/mod_sso/test/httpd_integration_test.py
with
7 additions
and
4 deletions
src/mod_sso/test/httpd_integration_test.py
+
7
−
4
View file @
61c812fd
...
...
@@ -57,7 +57,7 @@ def _start_httpd(public_key, config_file):
return
httpd
def
_stop_httpd
(
httpd
):
def
_stop_httpd
(
httpd
,
dump_log
=
False
):
httpd
.
terminate
()
time
.
sleep
(
1
)
try
:
...
...
@@ -65,7 +65,7 @@ def _stop_httpd(httpd):
except
OSError
:
pass
#dump_log = (
os.getenv('DUMP_APACHE_LOG')
== '1')
if
os
.
getenv
(
'
DUMP_APACHE_LOG
'
)
:
dump_log
=
True
status
=
httpd
.
wait
()
if
os
.
WIFEXITED
(
status
):
...
...
@@ -80,6 +80,7 @@ def _stop_httpd(httpd):
dump_log
=
True
if
dump_log
:
print
(
'
*** APACHE LOG ***
'
)
with
open
(
APACHE_LOG
)
as
fd
:
for
line
in
fd
:
print
(
line
.
rstrip
(
'
\n
'
))
...
...
@@ -138,6 +139,7 @@ class HttpdKeyLoadingTest(unittest.TestCase):
class
HttpdIntegrationTestBase
(
unittest
.
TestCase
):
CONFIG
=
None
DUMP_LOG
=
False
def
setUp
(
self
):
self
.
public
,
self
.
secret
=
sso
.
generate_keys
()
...
...
@@ -145,7 +147,7 @@ class HttpdIntegrationTestBase(unittest.TestCase):
self
.
httpd
=
_start_httpd
(
self
.
public
,
self
.
CONFIG
)
def
tearDown
(
self
):
_stop_httpd
(
self
.
httpd
)
_stop_httpd
(
self
.
httpd
,
self
.
DUMP_LOG
)
def
_ticket
(
self
,
user
=
"
testuser
"
,
group
=
"
group1
"
,
service
=
"
service.example.com/
"
,
nonce
=
None
):
...
...
@@ -377,6 +379,7 @@ class HttpdIntegrationTest(HttpdIntegrationTestBase):
class
HttpdIntegrationTestWithNonces
(
HttpdIntegrationTestBase
):
CONFIG
=
'
test-httpd-2.4-nonces.conf
'
DUMP_LOG
=
True
def
setUp
(
self
):
with
open
(
'
session.key
'
,
'
wb
'
)
as
fd
:
...
...
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