Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod-tests
Commits
30894c099580
Commit
d3830116
authored
Jul 17, 2020
by
Georges Racinet
🦑
Browse files
Heptapod: return output of rake commands
Will be useful for assertions --HG-- branch : heptapod-0-14
parent
34b54f1fa6ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/utils/heptapod.py
View file @
30894c09
...
...
@@ -487,7 +487,8 @@ class DockerHeptapod(Heptapod):
def
rake
(
self
,
*
args
):
cmd
=
[
'gitlab-rake'
]
cmd
.
extend
(
args
)
self
.
run_shell
(
cmd
,
user
=
'git'
)
code
,
out
=
self
.
execute
(
cmd
,
user
=
'git'
)
return
out
.
encode
()
# Consistency with HDK (returns bytes)
def
remove_all_backups
(
self
):
# using find in order not to rely on shell expansion for *.tar
...
...
@@ -555,6 +556,7 @@ class SourceHeptapod(Heptapod):
command
=
command
,
exit_code
=
exit_code
,
))
return
output
def
put_archive
(
self
,
dest
,
path
,
owner
=
'git'
):
if
owner
!=
'git'
:
...
...
@@ -605,7 +607,7 @@ class GdkHeptapod(SourceHeptapod):
cmd
=
[
'bundle'
,
'exec'
,
'rake'
]
cmd
.
extend
(
args
)
logger
.
debug
(
"GdkHeptapod: calling %r"
,
cmd
)
subprocess
.
check_
call
(
cmd
,
cwd
=
self
.
rails_root
)
return
subprocess
.
check_
output
(
cmd
,
cwd
=
self
.
rails_root
)
def
gitlab_ctl
(
self
,
command
,
services
=
None
):
base_cmd
=
(
'gdk'
,
command
)
...
...
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