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.cmdline
Commits
e12f23fc
Commit
e12f23fc
authored
Oct 18, 2019
by
Samuel GAIST
Browse files
[test][core] Improve push tests
parent
ba8985b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
beat/cmdline/test/core.py
View file @
e12f23fc
...
...
@@ -279,15 +279,22 @@ class AssetRemoteTest(AssetBaseTest):
@
slow
@
skip_disconnected
def
test_push_and_delete
(
self
):
asset_name
=
self
.
object_map
[
"create"
]
self
.
create
(
asset_name
)
asset_name
=
self
.
object_map
[
"push"
]
# now push the new object and then delete it remotely
exit_code
,
output
=
self
.
call
(
"push"
,
asset_name
,
prefix
=
tmp_prefix
)
exit_code
,
output
=
self
.
call
(
"push"
,
asset_name
)
nose
.
tools
.
eq_
(
exit_code
,
0
,
output
)
exit_code
,
output
=
self
.
call
(
"rm"
,
"--remote"
,
asset_name
,
prefix
=
tmp_prefix
)
exit_code
,
output
=
self
.
call
(
"rm"
,
"--remote"
,
asset_name
)
nose
.
tools
.
eq_
(
exit_code
,
0
,
output
)
@
slow
@
skip_disconnected
def
test_fail_not_owner_push
(
self
):
asset_name
=
self
.
object_map
[
"not_owner_push"
]
exit_code
,
output
=
self
.
call
(
"push"
,
asset_name
)
nose
.
tools
.
eq_
(
exit_code
,
1
,
output
)
class
OnlineTestMixin
:
"""Mixin for using Django's live server"""
...
...
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