Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
workspaces
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ssa
workspaces
Commits
3eae9f78
Commit
3eae9f78
authored
4 years ago
by
Andrew Kapuscinski
Browse files
Options
Downloads
Patches
Plain Diff
modified datafetcher tests to run inside docker container
parent
e9788ea7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!116
WS 78 fix datafetcher tests
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/cli/executables/datafetcher/test/df_pytest_utils.py
+2
-2
2 additions, 2 deletions
apps/cli/executables/datafetcher/test/df_pytest_utils.py
apps/cli/executables/datafetcher/test/test_df_return_codes.py
+10
-0
10 additions, 0 deletions
.../cli/executables/datafetcher/test/test_df_return_codes.py
with
12 additions
and
2 deletions
apps/cli/executables/datafetcher/test/df_pytest_utils.py
+
2
−
2
View file @
3eae9f78
...
...
@@ -24,7 +24,7 @@ def get_project_root() -> Path:
"""
my_path
=
Path
(
__file__
)
path
=
my_path
while
not
path
.
name
.
endswith
(
"
workspaces
"
)
and
not
path
.
name
.
endswith
(
"
code
"
):
while
not
path
.
name
.
endswith
(
"
workspaces
"
)
and
not
path
.
name
.
endswith
(
"
packages
"
):
path
=
path
.
parent
return
path
...
...
@@ -53,7 +53,7 @@ from datafetcher.utilities import (
RetrievalMode
,
)
TEST_PROFILE
=
"
l
oc
al
"
TEST_PROFILE
=
"
d
oc
ker
"
MISSING_SETTING
=
ReturnCode
.
MISSING_SETTING
.
value
[
"
code
"
]
MISSING_PROFILE
=
ReturnCode
.
MISSING_PROFILE
.
value
[
"
code
"
]
RUN_ALL
=
True
...
...
This diff is collapsed.
Click to expand it.
apps/cli/executables/datafetcher/test/test_df_return_codes.py
+
10
−
0
View file @
3eae9f78
...
...
@@ -66,12 +66,22 @@ def test_omitted_profile_returns_expected_code(make_tempdir, settings):
:return:
"""
# store existing CAPO_PROFILE
existing_capo_profile
=
os
.
environ
[
"
CAPO_PROFILE
"
]
# remove existing CAPO_PROFILE
os
.
environ
[
"
CAPO_PROFILE
"
]
=
""
# omit --profile arg
args
=
[
'
--product-locator
'
,
settings
.
test_data
[
'
product_locator
'
],
'
--output-dir
'
,
str
(
make_tempdir
)]
return_code
=
launch_datafetcher
(
args
,
settings
.
capo_settings
)
assert
return_code
==
MISSING_PROFILE
# restore the existing CAPO_PROFILE
os
.
environ
[
"
CAPO_PROFILE
"
]
=
existing_capo_profile
@pytest.mark.skipif
(
not
RUN_ALL
,
reason
=
'
debug
'
)
def
test_omitted_capo_value_returns_expected_code
(
make_tempdir
,
settings
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment