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
a2b2fde9
Commit
a2b2fde9
authored
6 years ago
by
Jonathan Maw
Browse files
Options
Downloads
Patches
Plain Diff
tests: Workspace tests check existence of .bstproject.yaml
parent
d93ccd59
No related branches found
No related tags found
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/frontend/workspace.py
+11
-0
11 additions, 0 deletions
tests/frontend/workspace.py
with
11 additions
and
0 deletions
tests/frontend/workspace.py
+
11
−
0
View file @
a2b2fde9
...
...
@@ -93,6 +93,13 @@ def open_workspace(cli, tmpdir, datafiles, kind, track, suffix='', workspace_dir
result
.
assert_success
()
# Assert that a .bstproject.yaml file has been created
# and contains the path to the project
bstproject_path
=
os
.
path
.
join
(
workspace_dir
,
'
.bstproject.yaml
'
)
assert
os
.
path
.
exists
(
bstproject_path
)
with
open
(
bstproject_path
)
as
f
:
assert
project_path
in
f
.
read
()
# Assert that we are now buildable because the source is
# now cached.
assert
cli
.
get_element_state
(
project_path
,
element_name
)
==
'
buildable
'
...
...
@@ -148,6 +155,10 @@ def test_open_force(cli, tmpdir, datafiles, kind):
# Assert the workspace dir still exists
assert
os
.
path
.
exists
(
workspace
)
# Assert the bstproject doesn't exist
bstproject_path
=
os
.
path
.
join
(
workspace
,
'
.bstproject.yaml
'
)
assert
not
os
.
path
.
exists
(
bstproject_path
)
# Now open the workspace again with --force, this should happily succeed
result
=
cli
.
run
(
project
=
project
,
args
=
[
'
workspace
'
,
'
open
'
,
'
--force
'
,
element_name
,
workspace
...
...
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