Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
buildstream
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
Container registry
Model registry
Operate
Environments
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
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
BuildStream
buildstream
Commits
90c00ba3
Commit
90c00ba3
authored
6 years ago
by
Jürg Billeter
Browse files
Options
Downloads
Patches
Plain Diff
tests/artifactcache/pull.py: Use Context for artifact cache creation
parent
43521318
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/artifactcache/pull.py
+5
-6
5 additions, 6 deletions
tests/artifactcache/pull.py
with
5 additions
and
6 deletions
tests/artifactcache/pull.py
+
5
−
6
View file @
90c00ba3
...
...
@@ -6,7 +6,6 @@ import signal
import
pytest
from
buildstream
import
_yaml
,
_signals
,
utils
from
buildstream._artifactcache.cascache
import
CASCache
from
buildstream._context
import
Context
from
buildstream._project
import
Project
from
buildstream._protos.build.bazel.remote.execution.v2
import
remote_execution_pb2
...
...
@@ -88,7 +87,7 @@ def test_pull(cli, tmpdir, datafiles):
# Load the project and CAS cache
project
=
Project
(
project_dir
,
context
)
project
.
ensure_fully_loaded
()
cas
=
CASCache
(
context
)
cas
=
context
.
artifactcache
# Assert that the element's artifact is **not** cached
element
=
project
.
load_elements
([
'
target.bst
'
],
cas
)[
0
]
...
...
@@ -130,7 +129,7 @@ def _test_pull(user_config_file, project_dir, artifact_dir,
project
.
ensure_fully_loaded
()
# Create a local CAS cache handle
cas
=
CASCache
(
context
)
cas
=
context
.
artifactcache
# Load the target element
element
=
project
.
load_elements
([
element_name
],
cas
)[
0
]
...
...
@@ -191,7 +190,7 @@ def test_pull_tree(cli, tmpdir, datafiles):
# Load the project and CAS cache
project
=
Project
(
project_dir
,
context
)
project
.
ensure_fully_loaded
()
cas
=
CASCache
(
context
)
cas
=
context
.
artifactcache
# Assert that the element's artifact is cached
element
=
project
.
load_elements
([
'
target.bst
'
],
cas
)[
0
]
...
...
@@ -269,7 +268,7 @@ def _test_push_tree(user_config_file, project_dir, artifact_dir, artifact_digest
project
.
ensure_fully_loaded
()
# Create a local CAS cache handle
cas
=
CASCache
(
context
)
cas
=
context
.
artifactcache
# Manually setup the CAS remote
cas
.
setup_remotes
(
use_config
=
True
)
...
...
@@ -304,7 +303,7 @@ def _test_pull_tree(user_config_file, project_dir, artifact_dir, artifact_digest
project
.
ensure_fully_loaded
()
# Create a local CAS cache handle
cas
=
CASCache
(
context
)
cas
=
context
.
artifactcache
# Manually setup the CAS remote
cas
.
setup_remotes
(
use_config
=
True
)
...
...
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