Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.web
Commits
97a7f7fa
Commit
97a7f7fa
authored
Jun 09, 2020
by
Samuel GAIST
Browse files
[tests] Move all test environments to "Python for tests"
parent
6e6b9d4c
Changes
2
Hide whitespace changes
Inline
Side-by-side
beat/web/backend/tests/common.py
View file @
97a7f7fa
...
...
@@ -59,7 +59,7 @@ ONE_QUEUE_TWO_WORKERS = {
"time-limit"
:
1440
,
# 1 day
"cores-per-slot"
:
1
,
"max-slots-per-user"
:
2
,
"environments"
:
[
"Python
2.7
(1.3.0)"
],
"environments"
:
[
"Python
for tests
(1.3.0)"
],
"slots"
:
{
"node1"
:
{
"quantity"
:
1
,
"priority"
:
0
},
"node2"
:
{
"quantity"
:
1
,
"priority"
:
0
},
...
...
@@ -72,8 +72,8 @@ ONE_QUEUE_TWO_WORKERS = {
"node2"
:
{
"cores"
:
1
,
"memory"
:
16
*
1024
},
},
"environments"
:
{
"Python
2.7
(1.3.0)"
:
{
"name"
:
"Python
2.7
"
,
"Python
for tests
(1.3.0)"
:
{
"name"
:
"Python
for tests
"
,
"version"
:
"1.3.0"
,
"short_description"
:
"Test"
,
"description"
:
"Test environment"
,
...
...
@@ -96,7 +96,7 @@ class BackendUtilitiesMixin(object):
setup_backend
(
qsetup
.
DEFAULT_CONFIGURATION
)
Worker
.
objects
.
update
(
active
=
True
)
env
=
Environment
.
objects
.
get
(
name
=
"Python
2.7
"
)
env
=
Environment
.
objects
.
get
(
name
=
"Python
for tests
"
)
queue
=
Queue
.
objects
.
first
()
template_data
=
dict
(
...
...
@@ -222,7 +222,7 @@ class BaseBackendTestCase(TestCase, BackendUtilitiesMixin):
self
.
assertEqual
(
b0
.
dependencies
.
count
(),
0
)
self
.
assertEqual
(
b0
.
dependents
.
count
(),
1
)
self
.
assertEqual
(
b0
.
queue
.
name
,
"queue"
)
self
.
assertEqual
(
b0
.
environment
.
name
,
"Python
2.7
"
)
self
.
assertEqual
(
b0
.
environment
.
name
,
"Python
for tests
"
)
self
.
assertEqual
(
b0
.
required_slots
,
1
)
self
.
assertEqual
(
b0
.
inputs
.
count
(),
1
)
self
.
assertEqual
(
b0
.
outputs
.
count
(),
1
)
...
...
@@ -240,7 +240,7 @@ class BaseBackendTestCase(TestCase, BackendUtilitiesMixin):
self
.
assertEqual
(
b1
.
dependencies
.
count
(),
1
)
self
.
assertEqual
(
b1
.
dependents
.
count
(),
0
)
self
.
assertEqual
(
b1
.
queue
.
name
,
"queue"
)
self
.
assertEqual
(
b1
.
environment
.
name
,
"Python
2.7
"
)
self
.
assertEqual
(
b1
.
environment
.
name
,
"Python
for tests
"
)
self
.
assertEqual
(
b1
.
required_slots
,
1
)
self
.
assertEqual
(
b1
.
inputs
.
count
(),
1
)
self
.
assertEqual
(
b1
.
outputs
.
count
(),
1
)
...
...
beat/web/backend/tests/test_setup.py
View file @
97a7f7fa
...
...
@@ -54,7 +54,7 @@ QUEUES_WITHOUT_PRIORITY = {
"time-limit"
:
180
,
# 3 hours
"cores-per-slot"
:
1
,
"max-slots-per-user"
:
4
,
"environments"
:
[
"Python
2.7
(1.3.0)"
],
"environments"
:
[
"Python
for tests
(1.3.0)"
],
"groups"
:
[
"Default"
],
"slots"
:
{
"node1"
:
{
"quantity"
:
4
,
"priority"
:
0
}},
},
...
...
@@ -66,7 +66,7 @@ QUEUES_WITHOUT_PRIORITY = {
"time-limit"
:
360
,
# 6 hours
"cores-per-slot"
:
2
,
"max-slots-per-user"
:
2
,
"environments"
:
[
"Python
2.7
(1.3.0)"
],
"environments"
:
[
"Python
for tests
(1.3.0)"
],
"groups"
:
[
"Default"
],
"slots"
:
{
"node1"
:
{
"quantity"
:
2
,
"priority"
:
0
}},
},
...
...
@@ -78,7 +78,7 @@ QUEUES_WITHOUT_PRIORITY = {
"time-limit"
:
720
,
# 12 hours
"cores-per-slot"
:
4
,
"max-slots-per-user"
:
1
,
"environments"
:
[
"Python
2.7
(1.3.0)"
],
"environments"
:
[
"Python
for tests
(1.3.0)"
],
"groups"
:
[
"Default"
],
"slots"
:
{
"node1"
:
{
"quantity"
:
1
,
"priority"
:
0
}},
},
...
...
@@ -87,8 +87,8 @@ QUEUES_WITHOUT_PRIORITY = {
),
"workers"
:
{
"node1"
:
{
"cores"
:
4
,
"memory"
:
16
*
1024
}},
"environments"
:
{
"Python
2.7
(1.3.0)"
:
{
"name"
:
"Python
2.7
"
,
"Python
for tests
(1.3.0)"
:
{
"name"
:
"Python
for tests
"
,
"version"
:
"1.3.0"
,
"short_description"
:
"Test"
,
"description"
:
"Test environment"
,
...
...
@@ -108,7 +108,7 @@ PRIORITY_QUEUES = {
"time-limit"
:
180
,
# 3 hours
"cores-per-slot"
:
1
,
"max-slots-per-user"
:
2
,
"environments"
:
[
"Python
2.7
(1.3.0)"
],
"environments"
:
[
"Python
for tests
(1.3.0)"
],
"groups"
:
[
"Default"
],
"slots"
:
{
"node1"
:
{
"quantity"
:
4
,
"priority"
:
5
},
...
...
@@ -123,7 +123,7 @@ PRIORITY_QUEUES = {
"time-limit"
:
360
,
# 6 hours
"cores-per-slot"
:
2
,
"max-slots-per-user"
:
1
,
"environments"
:
[
"Python
2.7
(1.3.0)"
],
"environments"
:
[
"Python
for tests
(1.3.0)"
],
"groups"
:
[
"Default"
],
"slots"
:
{
"node1"
:
{
"quantity"
:
2
,
"priority"
:
0
},
...
...
@@ -138,7 +138,7 @@ PRIORITY_QUEUES = {
"time-limit"
:
180
,
# 3 hours
"cores-per-slot"
:
1
,
"max-slots-per-user"
:
8
,
"environments"
:
[
"Python
2.7
(1.3.0)"
],
"environments"
:
[
"Python
for tests
(1.3.0)"
],
"groups"
:
[
"Default"
],
"slots"
:
{
"node1"
:
{
"quantity"
:
4
,
"priority"
:
0
},
...
...
@@ -155,8 +155,8 @@ PRIORITY_QUEUES = {
]
),
"environments"
:
{
"Python
2.7
(1.3.0)"
:
{
"name"
:
"Python
2.7
"
,
"Python
for tests
(1.3.0)"
:
{
"name"
:
"Python
for tests
"
,
"version"
:
"1.3.0"
,
"short_description"
:
"Test"
,
"description"
:
"Test environment"
,
...
...
@@ -270,7 +270,7 @@ class BackendSetup(BaseBackendTestCase):
env
=
q1
.
environments
.
first
()
self
.
assertEqual
(
env
.
name
,
"Python
2.7
"
)
self
.
assertEqual
(
env
.
name
,
"Python
for tests
"
)
self
.
assertEqual
(
env
.
version
,
"1.3.0"
)
self
.
assertEqual
(
q1
.
slots
.
count
(),
1
)
...
...
@@ -377,7 +377,7 @@ class BackendSetup(BaseBackendTestCase):
env
=
q1
.
environments
.
first
()
self
.
assertEqual
(
env
.
name
,
"Python
2.7
"
)
self
.
assertEqual
(
env
.
name
,
"Python
for tests
"
)
self
.
assertEqual
(
env
.
version
,
"1.3.0"
)
self
.
assertEqual
(
q1
.
slots
.
count
(),
2
)
...
...
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