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
Léo-Paul Géneau
slapos
Commits
88af808d
Commit
88af808d
authored
Feb 28, 2019
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend/test: Flake8ize
parent
9e54fb65
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
software/caddy-frontend/test/test.py
software/caddy-frontend/test/test.py
+11
-8
No files found.
software/caddy-frontend/test/test.py
View file @
88af808d
...
...
@@ -42,7 +42,6 @@ from forcediphttpsadapter.adapters import ForcedIPHTTPSAdapter
import
time
import
tempfile
import
ipaddress
import
importlib
from
utils
import
SlapOSInstanceTestCase
from
utils
import
findFreeTCPPort
...
...
@@ -224,6 +223,7 @@ def getQUIC(url, ip, port):
except
subprocess
.
CalledProcessError
as
e
:
return
False
,
e
.
output
def
getPluginParameterDict
(
software_path
,
filepath
):
bin_file
=
os
.
path
.
join
(
software_path
,
'bin'
,
'test-plugin-promise'
)
with
open
(
bin_file
,
'w'
)
as
f
:
...
...
@@ -248,6 +248,7 @@ print json.dumps(module.extra_config_dict)
except
ValueError
,
e
:
raise
ValueError
(
"%s
\
n
Result was: %s"
%
(
e
,
result
))
class
TestDataMixin
(
object
):
@
staticmethod
def
generateHashFromFiles
(
file_list
):
...
...
@@ -1081,12 +1082,12 @@ http://apachecustomhttpsaccepted.example.com:%%(http_port)s {
def
test_promise_monitor_httpd_listening_on_tcp
(
self
):
runpromise_bin
=
os
.
path
.
join
(
self
.
software_path
,
'bin'
,
'monitor.runpromise'
)
runpromise_bin
=
os
.
path
.
join
(
self
.
software_path
,
'bin'
,
'monitor.runpromise'
)
result
=
set
([
subprocess
.
call
([
runpromise_bin
,
'-c'
,
os
.
path
.
join
(
os
.
path
.
dirname
(
q
)
,
'../monitor.conf'
),
subprocess
.
call
([
runpromise_bin
,
'-c'
,
os
.
path
.
join
(
os
.
path
.
dirname
(
q
),
'../monitor.conf'
),
'--run-only'
,
'monitor-httpd-listening-on-tcp.py'
]
)
for
q
in
glob
.
glob
(
...
...
@@ -3407,7 +3408,8 @@ class TestRe6stVerificationUrlDefaultSlave(SlaveHttpFrontendTestCase,
re6st_connectivity_promise_file = re6st_connectivity_promise_list[0]
self.assertEqual(
getPluginParameterDict(self.software_path, re6st_connectivity_promise_file),
getPluginParameterDict(
self.software_path, re6st_connectivity_promise_file),
{
'
url
': '
http
:
//
[
2001
:
67
c
:
1254
:
4
::
1
]
/
index
.
html
',
}
...
...
@@ -3459,7 +3461,8 @@ class TestRe6stVerificationUrlSlave(SlaveHttpFrontendTestCase,
re6st_connectivity_promise_file = re6st_connectivity_promise_list[0]
self.assertEqual(
getPluginParameterDict(self.software_path, re6st_connectivity_promise_file),
getPluginParameterDict(
self.software_path, re6st_connectivity_promise_file),
{
'
url
': '
some
-
re6st
-
verification
-
url
',
}
...
...
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