Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
slapos
Commits
7b1db16a
Commit
7b1db16a
authored
Nov 06, 2018
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend: flake8ize test
parent
8ded60db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
software/caddy-frontend/test/test.py
software/caddy-frontend/test/test.py
+12
-9
No files found.
software/caddy-frontend/test/test.py
View file @
7b1db16a
...
@@ -731,8 +731,9 @@ http://apachecustomhttpsaccepted.example.com:%%(http_port)s {
...
@@ -731,8 +731,9 @@ http://apachecustomhttpsaccepted.example.com:%%(http_port)s {
# partition w/o etc/trafficserver, but with buildout.cfg
# partition w/o etc/trafficserver, but with buildout.cfg
return
[
return
[
q
for
q
in
glob
.
glob
(
os
.
path
.
join
(
self
.
instance_path
,
'*'
,))
q
for
q
in
glob
.
glob
(
os
.
path
.
join
(
self
.
instance_path
,
'*'
,))
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
q
,
'etc'
,
'trafficserver'
))
and
if
not
os
.
path
.
exists
(
os
.
path
.
exists
(
os
.
path
.
join
(
q
,
'buildout.cfg'
))][
0
]
os
.
path
.
join
(
q
,
'etc'
,
'trafficserver'
))
and
os
.
path
.
exists
(
os
.
path
.
join
(
q
,
'buildout.cfg'
))][
0
]
def
getSlavePartitionPath
(
self
):
def
getSlavePartitionPath
(
self
):
# partition w/ etc/trafficserver
# partition w/ etc/trafficserver
...
@@ -847,10 +848,10 @@ http://apachecustomhttpsaccepted.example.com:%%(http_port)s {
...
@@ -847,10 +848,10 @@ http://apachecustomhttpsaccepted.example.com:%%(http_port)s {
self
.
instance_path
,
'*'
,
'var'
,
'log'
,
'httpd'
,
'_empty_access_log'
self
.
instance_path
,
'*'
,
'var'
,
'log'
,
'httpd'
,
'_empty_access_log'
))[
0
]
))[
0
]
log_regexp
=
'^
\
d{
1
,3}
\
.
\
d{1,3}
\
.
\
d{1,3}
\
.
\
d{1,3} SOME_REMOTE_USER '
\
log_regexp
=
r
'^\
d{
1,3}\
.
\d{1,3}\
.
\d{1,3}\
.
\d{1,3} SOME_REMOTE_USER '
\
'
\
[
\
d{2}
\
/.{
3
}
\
/
\
d{4}
\
:
\
d{2}
\
:
\
d{2}
\
:
\
d{2}
\
+
\
d{4}
\
]
'
\
r
'\
[
\d{2}\
/.{
3}\
/
\d{4}\
:
\d{2}\
:
\d{2}\
:
\d{2} \
+
\d{4}\
]
' \
'"GET
\
/
t
est-path HTTP
\
/
1
.1"
404
\
d
+
"-"
'
\
r
'"GET
\
/
t
est-path HTTP
\
/
1
.1"
404
\
d
+
"-"
'
\
'"python-requests.*"
\
d
+
'
r
'"python-requests.*"
\
d
+
'
self.assertRegexpMatches(
self.assertRegexpMatches(
open(log_file, 'r').read(),
open(log_file, 'r').read(),
...
@@ -2803,8 +2804,9 @@ class TestQuicEnabled(SlaveHttpFrontendTestCase, TestDataMixin):
...
@@ -2803,8 +2804,9 @@ class TestQuicEnabled(SlaveHttpFrontendTestCase, TestDataMixin):
# partition w/o etc/trafficserver, but with buildout.cfg
# partition w/o etc/trafficserver, but with buildout.cfg
return
[
return
[
q
for
q
in
glob
.
glob
(
os
.
path
.
join
(
self
.
instance_path
,
'*'
,))
q
for
q
in
glob
.
glob
(
os
.
path
.
join
(
self
.
instance_path
,
'*'
,))
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
q
,
'etc'
,
'trafficserver'
))
and
if
not
os
.
path
.
exists
(
os
.
path
.
exists
(
os
.
path
.
join
(
q
,
'buildout.cfg'
))][
0
]
os
.
path
.
join
(
q
,
'etc'
,
'trafficserver'
))
and
os
.
path
.
exists
(
os
.
path
.
join
(
q
,
'buildout.cfg'
))][
0
]
def
getSlavePartitionPath
(
self
):
def
getSlavePartitionPath
(
self
):
# partition w/ etc/trafficserver
# partition w/ etc/trafficserver
...
@@ -2914,7 +2916,7 @@ https://www.google.com {}""",
...
@@ -2914,7 +2916,7 @@ https://www.google.com {}""",
},
},
're6st-optimal-test-unsafe'
:
{
're6st-optimal-test-unsafe'
:
{
're6st-optimal-test'
:
're6st-optimal-test'
:
'new
\
n
line;rm -fr ~;,new
\
li
n
e
\
n
[s${esection:eoption}'
,
'new
\
n
line;rm -fr ~;,new
\
\
line
\
n
[s${esection:eoption}'
,
},
},
'custom_domain-unsafe'
:
{
'custom_domain-unsafe'
:
{
'custom_domain'
:
'${section:option} afterspace
\
n
afternewline'
,
'custom_domain'
:
'${section:option} afterspace
\
n
afternewline'
,
...
@@ -3412,6 +3414,7 @@ class TestDuplicateSiteKeyProtection(SlaveHttpFrontendTestCase, TestDataMixin):
...
@@ -3412,6 +3414,7 @@ class TestDuplicateSiteKeyProtection(SlaveHttpFrontendTestCase, TestDataMixin):
parameter_dict
parameter_dict
)
)
class
AutoRestartTestCase
(
SlaveHttpFrontendTestCase
):
class
AutoRestartTestCase
(
SlaveHttpFrontendTestCase
):
@
classmethod
@
classmethod
def
getInstanceParameterDict
(
cls
):
def
getInstanceParameterDict
(
cls
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment