Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
veTurboIO
Commits
7feb2732
Commit
7feb2732
authored
Mar 25, 2024
by
liuledian
Committed by
huteng.ht
Jun 09, 2024
Browse files
fix(ut): clean files in ut
parent
e16439e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
tests/test_fetch_cipher.py
tests/test_fetch_cipher.py
+10
-0
No files found.
tests/test_fetch_cipher.py
View file @
7feb2732
...
@@ -249,6 +249,8 @@ class TestCredentials(TestCase):
...
@@ -249,6 +249,8 @@ class TestCredentials(TestCase):
os
.
environ
[
'SFCS_SECRET_KEY'
]
=
'TVRNNVlqRmxPR1**mRoTkdWbE1ESQ=='
os
.
environ
[
'SFCS_SECRET_KEY'
]
=
'TVRNNVlqRmxPR1**mRoTkdWbE1ESQ=='
os
.
environ
[
'SFCS_NAMENODE_ENDPOINT_ADDRESS'
]
=
'100.67.19.231'
os
.
environ
[
'SFCS_NAMENODE_ENDPOINT_ADDRESS'
]
=
'100.67.19.231'
sfcs_conf
=
os
.
path
.
join
(
os
.
getcwd
(),
'base_model2.xml'
)
sfcs_conf
=
os
.
path
.
join
(
os
.
getcwd
(),
'base_model2.xml'
)
if
os
.
path
.
exists
(
sfcs_conf
):
os
.
remove
(
sfcs_conf
)
init_sfcs_conf
(
'/base_model2/tensor.pt'
)
init_sfcs_conf
(
'/base_model2/tensor.pt'
)
self
.
assertEqual
(
os
.
environ
[
'LIBCFS_CONF'
],
sfcs_conf
)
self
.
assertEqual
(
os
.
environ
[
'LIBCFS_CONF'
],
sfcs_conf
)
self
.
assertEqual
(
len
(
credentials_helper
.
threads
),
0
)
self
.
assertEqual
(
len
(
credentials_helper
.
threads
),
0
)
...
@@ -263,6 +265,10 @@ class TestCredentials(TestCase):
...
@@ -263,6 +265,10 @@ class TestCredentials(TestCase):
os
.
environ
.
pop
(
'SFCS_NAMENODE_ENDPOINT_ADDRESS'
,
None
)
os
.
environ
.
pop
(
'SFCS_NAMENODE_ENDPOINT_ADDRESS'
,
None
)
sfcs_conf3
=
os
.
path
.
join
(
os
.
getcwd
(),
'base_model3.xml'
)
sfcs_conf3
=
os
.
path
.
join
(
os
.
getcwd
(),
'base_model3.xml'
)
sfcs_conf4
=
os
.
path
.
join
(
os
.
getcwd
(),
'base_model4.xml'
)
sfcs_conf4
=
os
.
path
.
join
(
os
.
getcwd
(),
'base_model4.xml'
)
if
os
.
path
.
exists
(
sfcs_conf3
):
os
.
remove
(
sfcs_conf3
)
if
os
.
path
.
exists
(
sfcs_conf4
):
os
.
remove
(
sfcs_conf4
)
init_sfcs_conf
(
'/base_model3/tensor.pt'
)
init_sfcs_conf
(
'/base_model3/tensor.pt'
)
init_sfcs_conf
(
'/base_model4/tensor.pt'
)
init_sfcs_conf
(
'/base_model4/tensor.pt'
)
self
.
assertTrue
(
'base_model3'
in
credentials_helper
.
threads
)
self
.
assertTrue
(
'base_model3'
in
credentials_helper
.
threads
)
...
@@ -290,6 +296,10 @@ class TestCredentials(TestCase):
...
@@ -290,6 +296,10 @@ class TestCredentials(TestCase):
os
.
environ
.
pop
(
'SFCS_NAMENODE_ENDPOINT_ADDRESS'
,
None
)
os
.
environ
.
pop
(
'SFCS_NAMENODE_ENDPOINT_ADDRESS'
,
None
)
sfcs_conf1
=
os
.
path
.
join
(
os
.
getcwd
(),
'base_model1.xml'
)
sfcs_conf1
=
os
.
path
.
join
(
os
.
getcwd
(),
'base_model1.xml'
)
sfcs_conf2
=
os
.
path
.
join
(
os
.
getcwd
(),
'base_model2.xml'
)
sfcs_conf2
=
os
.
path
.
join
(
os
.
getcwd
(),
'base_model2.xml'
)
if
os
.
path
.
exists
(
sfcs_conf1
):
os
.
remove
(
sfcs_conf1
)
if
os
.
path
.
exists
(
sfcs_conf2
):
os
.
remove
(
sfcs_conf2
)
init_sfcs_conf
(
'/base_model1/tensor.pt'
)
init_sfcs_conf
(
'/base_model1/tensor.pt'
)
init_sfcs_conf
(
'/base_model2/tensor.pt'
)
init_sfcs_conf
(
'/base_model2/tensor.pt'
)
self
.
assertTrue
(
'base_model1'
in
credentials_helper
.
threads
)
self
.
assertTrue
(
'base_model1'
in
credentials_helper
.
threads
)
...
...
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