Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
nexedi
re6stnet
Commits
60d04954
Commit
60d04954
authored
Apr 11, 2024
by
Tom Niget
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test
parent
fe2f9697
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
re6st/tests/test_end2end/test_registry_client.py
re6st/tests/test_end2end/test_registry_client.py
+4
-4
No files found.
re6st/tests/test_end2end/test_registry_client.py
View file @
60d04954
...
...
@@ -70,7 +70,7 @@ class TestRegistryClientInteract(unittest.TestCase):
self
.
fail
(
"Request token failed, no token in database"
)
# token: tuple[unicode,]
token
=
str
(
token
[
0
])
self
.
assertEqual
(
client
.
isToken
(
token
)
,
b
"1"
)
self
.
assertEqual
(
client
.
isToken
(
token
)
.
decode
(),
"1"
)
# request ca
ca
=
client
.
getCa
()
...
...
@@ -78,7 +78,7 @@ class TestRegistryClientInteract(unittest.TestCase):
# request a cert and get cn
key
,
csr
=
tools
.
generate_csr
()
cert
=
client
.
requestCertificate
(
token
,
csr
)
self
.
assertEqual
(
client
.
isToken
(
token
)
,
b
''
,
"token should be deleted"
)
self
.
assertEqual
(
client
.
isToken
(
token
)
.
decode
(),
''
,
"token should be deleted"
)
# creat x509.cert object
def
write_to_temp
(
text
):
...
...
@@ -97,7 +97,7 @@ class TestRegistryClientInteract(unittest.TestCase):
# verfiy cn and prefix
prefix
=
client
.
cert
.
prefix
cn
=
client
.
getNodePrefix
(
email
)
cn
=
client
.
getNodePrefix
(
email
)
.
decode
()
self
.
assertEqual
(
tools
.
prefix2cn
(
prefix
),
cn
)
# simulate the process in cache
...
...
@@ -108,7 +108,7 @@ class TestRegistryClientInteract(unittest.TestCase):
# no re6stnet, empty result
bootpeer
=
client
.
getBootstrapPeer
(
prefix
)
self
.
assertEqual
(
bootpeer
,
""
)
self
.
assertEqual
(
bootpeer
.
decode
()
,
""
)
# server should not die
self
.
assertIsNone
(
self
.
server
.
proc
.
poll
())
...
...
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