Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
File Transfer Service
fts-rest
Commits
26d25a75
Commit
26d25a75
authored
Jul 06, 2017
by
Maria Arsuaga Rios
Browse files
FTS-977
: Improving tests and importing Float
parent
b1eb1bc5
Pipeline
#156680
passed with stage
in 2 minutes and 10 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/fts3/model/config.py
View file @
26d25a75
...
...
@@ -16,7 +16,7 @@
# limitations under the License.
from
distutils.version
import
StrictVersion
from
sqlalchemy
import
Column
,
DateTime
,
ForeignKeyConstraint
from
sqlalchemy
import
Column
,
DateTime
,
ForeignKeyConstraint
,
Float
from
sqlalchemy
import
Integer
,
String
from
sqlalchemy
import
and_
from
sqlalchemy
import
__version__
as
sqlalchemy_version
...
...
src/fts3rest/fts3rest/tests/functional/test_config_se.py
View file @
26d25a75
...
...
@@ -47,9 +47,9 @@ class TestConfigSe(TestController):
},
'se_info'
:
{
'ipv6'
:
True
,
'outbound_m
in
_active'
:
55
,
'inbound_m
in
_active'
:
1
,
'inbound_m
in
_throughput'
:
33
'outbound_m
ax
_active'
:
55
,
'inbound_m
ax
_active'
:
1
,
'inbound_m
ax
_throughput'
:
33
}
}
}
...
...
@@ -68,9 +68,9 @@ class TestConfigSe(TestController):
se
=
Session
.
query
(
Se
).
filter
(
Se
.
storage
==
'test.cern.ch'
).
first
()
self
.
assertEqual
(
True
,
se
.
ipv6
)
self
.
assertEqual
(
55
,
se
.
outbound_m
in
_active
)
self
.
assertEqual
(
1
,
se
.
inbound_m
in
_active
)
self
.
assertEqual
(
33
,
se
.
inbound_m
in
_throughput
)
self
.
assertEqual
(
55
,
se
.
outbound_m
ax
_active
)
self
.
assertEqual
(
1
,
se
.
inbound_m
ax
_active
)
self
.
assertEqual
(
33
,
se
.
inbound_m
ax
_throughput
)
def
test_reset_se_config
(
self
):
"""
...
...
@@ -92,9 +92,9 @@ class TestConfigSe(TestController):
},
'se_info'
:
{
'ipv6'
:
False
,
'outbound_m
in
_active'
:
88
,
'inbound_m
in
_active'
:
11
,
'inbound_m
in
_throughput'
:
10
'outbound_m
ax
_active'
:
88
,
'inbound_m
ax
_active'
:
11
,
'inbound_m
ax
_throughput'
:
10
}
}
}
...
...
@@ -113,9 +113,9 @@ class TestConfigSe(TestController):
se
=
Session
.
query
(
Se
).
filter
(
Se
.
storage
==
'test.cern.ch'
).
first
()
self
.
assertEqual
(
False
,
se
.
ipv6
)
self
.
assertEqual
(
88
,
se
.
outbound_m
in
_active
)
self
.
assertEqual
(
11
,
se
.
inbound_m
in
_active
)
self
.
assertEqual
(
10
,
se
.
inbound_m
in
_throughput
)
self
.
assertEqual
(
88
,
se
.
outbound_m
ax
_active
)
self
.
assertEqual
(
11
,
se
.
inbound_m
ax
_active
)
self
.
assertEqual
(
10
,
se
.
inbound_m
ax
_throughput
)
def
test_get_se_config
(
self
):
"""
...
...
@@ -137,9 +137,9 @@ class TestConfigSe(TestController):
)
self
.
assertEqual
(
True
,
se_cfg
[
'se_info'
][
'ipv6'
])
self
.
assertEqual
(
55
,
se_cfg
[
'se_info'
][
'outbound_m
in
_active'
])
self
.
assertEqual
(
1
,
se_cfg
[
'se_info'
][
'inbound_m
in
_active'
])
self
.
assertEqual
(
33
,
se_cfg
[
'se_info'
][
'inbound_m
in
_throughput'
])
self
.
assertEqual
(
55
,
se_cfg
[
'se_info'
][
'outbound_m
ax
_active'
])
self
.
assertEqual
(
1
,
se_cfg
[
'se_info'
][
'inbound_m
ax
_active'
])
self
.
assertEqual
(
33
,
se_cfg
[
'se_info'
][
'inbound_m
ax
_throughput'
])
def
test_set_malformed
(
self
):
"""
...
...
@@ -160,9 +160,9 @@ class TestConfigSe(TestController):
},
'se_info'
:
{
'ipv6'
:
False
,
'outbound_m
in
_active'
:
88
,
'inbound_m
in
_active'
:
11
,
'inbound_m
in
_throughput'
:
10
'outbound_m
ax
_active'
:
88
,
'inbound_m
ax
_active'
:
11
,
'inbound_m
ax
_throughput'
:
10
}
}
},
...
...
@@ -179,8 +179,8 @@ class TestConfigSe(TestController):
'se_info'
:
{
'ipv6'
:
False
,
'active'
:
'not again!'
,
'inbound_m
in
_active'
:
11
,
'inbound_m
in
_throughput'
:
10
'inbound_m
ax
_active'
:
11
,
'inbound_m
ax
_throughput'
:
10
}
}
},
...
...
@@ -191,8 +191,8 @@ class TestConfigSe(TestController):
'test.cern.ch'
:
{
'se_info'
:
{
'ipv6'
:
True
,
'inbound_m
in
_active'
:
0.5
,
'inbound_m
in
_throughput'
:
10
'inbound_m
ax
_active'
:
0.5
,
'inbound_m
ax
_throughput'
:
10
}
}
},
...
...
Write
Preview
Supports
Markdown
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