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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Alain Takoudjou
slapos
Commits
eaa24281
Commit
eaa24281
authored
Oct 11, 2019
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend/test: Switch to slapos.testing.testcase
parent
2bd95ea0
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
343 deletions
+14
-343
software/caddy-frontend/test/test.py
software/caddy-frontend/test/test.py
+14
-16
software/caddy-frontend/test/utils.py
software/caddy-frontend/test/utils.py
+0
-327
No files found.
software/caddy-frontend/test/test.py
View file @
eaa24281
...
@@ -54,9 +54,6 @@ try:
...
@@ -54,9 +54,6 @@ try:
except
ImportError
:
except
ImportError
:
from
backports
import
lzma
from
backports
import
lzma
from
utils
import
SlapOSInstanceTestCase
from
utils
import
findFreeTCPPort
import
datetime
import
datetime
from
cryptography
import
x509
from
cryptography
import
x509
...
@@ -66,6 +63,13 @@ from cryptography.hazmat.primitives import serialization
...
@@ -66,6 +63,13 @@ from cryptography.hazmat.primitives import serialization
from
cryptography.hazmat.primitives.asymmetric
import
rsa
from
cryptography.hazmat.primitives.asymmetric
import
rsa
from
cryptography.x509.oid
import
NameOID
from
cryptography.x509.oid
import
NameOID
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
from
slapos.testing.utils
import
findFreeTCPPort
setUpModule
,
SlapOSInstanceTestCase
=
makeModuleSetUpAndTestCaseClass
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software.cfg'
)))
SLAPOS_TEST_IPV4
=
os
.
environ
[
'SLAPOS_TEST_IPV4'
]
SLAPOS_TEST_IPV4
=
os
.
environ
[
'SLAPOS_TEST_IPV4'
]
SLAPOS_TEST_IPV6
=
os
.
environ
[
'SLAPOS_TEST_IPV6'
]
SLAPOS_TEST_IPV6
=
os
.
environ
[
'SLAPOS_TEST_IPV6'
]
...
@@ -467,12 +471,6 @@ class HttpFrontendTestCase(SlapOSInstanceTestCase):
...
@@ -467,12 +471,6 @@ class HttpFrontendTestCase(SlapOSInstanceTestCase):
# show full diffs, as it is required for proper analysis of problems
# show full diffs, as it is required for proper analysis of problems
maxDiff
=
None
maxDiff
=
None
@
classmethod
def
getSoftwareURLList
(
cls
):
return
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software.cfg'
)),
)
@
classmethod
@
classmethod
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
super
(
HttpFrontendTestCase
,
cls
).
setUpClass
()
super
(
HttpFrontendTestCase
,
cls
).
setUpClass
()
...
@@ -797,8 +795,8 @@ class SlaveHttpFrontendTestCase(HttpFrontendTestCase):
...
@@ -797,8 +795,8 @@ class SlaveHttpFrontendTestCase(HttpFrontendTestCase):
return False
return False
for slave_reference, partition_parameter_kw in cls
\
for slave_reference, partition_parameter_kw in cls
\
.getSlaveParameterDictDict().items():
.getSlaveParameterDictDict().items():
parameter_dict = cls.
slapos_controler.slap.registerOpenOrder().
request(
parameter_dict = cls.request(
software_release=cls.
software_url_list[0]
,
software_release=cls.
getSoftwareURL()
,
partition_reference=slave_reference,
partition_reference=slave_reference,
partition_parameter_kw=partition_parameter_kw,
partition_parameter_kw=partition_parameter_kw,
shared=True
shared=True
...
@@ -815,11 +813,11 @@ class SlaveHttpFrontendTestCase(HttpFrontendTestCase):
...
@@ -815,11 +813,11 @@ class SlaveHttpFrontendTestCase(HttpFrontendTestCase):
@classmethod
@classmethod
def setUpSlaves(cls):
def setUpSlaves(cls):
cls.slave_connection_parameter_dict_dict = {}
cls.slave_connection_parameter_dict_dict = {}
request = cls.slap
os_controler.slap.registerOpenOrder()
.request
request = cls.slap.request
for slave_reference, partition_parameter_kw in cls
\
for slave_reference, partition_parameter_kw in cls
\
.getSlaveParameterDictDict().items():
.getSlaveParameterDictDict().items():
slave_instance = request(
slave_instance = request(
software_release=cls.
software_url_list[0]
,
software_release=cls.
getSoftwareURL()
,
partition_reference=slave_reference,
partition_reference=slave_reference,
partition_parameter_kw=partition_parameter_kw,
partition_parameter_kw=partition_parameter_kw,
shared=True
shared=True
...
@@ -830,7 +828,7 @@ class SlaveHttpFrontendTestCase(HttpFrontendTestCase):
...
@@ -830,7 +828,7 @@ class SlaveHttpFrontendTestCase(HttpFrontendTestCase):
for slave_reference, partition_parameter_kw in cls
\
for slave_reference, partition_parameter_kw in cls
\
.getSlaveParameterDictDict().items():
.getSlaveParameterDictDict().items():
slave_instance = request(
slave_instance = request(
software_release=cls.
software_url_list[0]
,
software_release=cls.
getSoftwareURL()
,
partition_reference=slave_reference,
partition_reference=slave_reference,
partition_parameter_kw=partition_parameter_kw,
partition_parameter_kw=partition_parameter_kw,
shared=True
shared=True
...
@@ -5917,8 +5915,8 @@ class TestSlaveSlapOSMasterCertificateCompatibility(
...
@@ -5917,8 +5915,8 @@ class TestSlaveSlapOSMasterCertificateCompatibility(
ssl_ca_crt=ca.certificate_pem,
ssl_ca_crt=ca.certificate_pem,
)
)
self.
slapos_controler.slap.registerOpenOrder().
request(
self.request(
software_release=self.
software_url_list[0]
,
software_release=self.
cls.getSoftwareURL()
,
partition_reference='custom_domain_ssl_crt_ssl_key_ssl_ca_crt',
partition_reference='custom_domain_ssl_crt_ssl_key_ssl_ca_crt',
partition_parameter_kw=slave_parameter_dict,
partition_parameter_kw=slave_parameter_dict,
shared=True
shared=True
...
...
software/caddy-frontend/test/utils.py
deleted
100644 → 0
View file @
2bd95ea0
This diff is collapsed.
Click to expand it.
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