New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(lifecycle): add deprecated snap command #4589
feat(lifecycle): add deprecated snap command #4589
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature/craft-application #4589 +/- ##
=============================================================
+ Coverage 88.83% 88.90% +0.06%
=============================================================
Files 327 332 +5
Lines 22033 22116 +83
=============================================================
+ Hits 19573 19662 +89
+ Misses 2460 2454 -6 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good overall, but some changes have been a bit too overreaching
c978fe1
to
2ae71d1
Compare
tests/conftest.py
Outdated
arch = util.get_host_architecture() | ||
return [ | ||
models.BuildInfo( | ||
"ubuntu-22.04", arch, arch, bases.BaseName("ubuntu", "22.04") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why these test fixtures are being copied from craft-application, but I think these bases should specify 24.04
at least
I am still not seeing why we cannot use the fixtures like we had from Rockcraft and we we had to bring in the Craft Application ones |
I agree actually. We don't need to bring in everything wholesale, we can put in just the things needed for the new tests. Simpler and less code to maintain. |
5624231
to
7777f02
Compare
This should significantly simplified the fixtures. (I had to force push due to merged wrong branch) |
tests/conftest.py
Outdated
def features(request) -> dict[str, bool]: | ||
"""Fixture that controls the enabled features. | ||
|
||
To use it, mark the test with the features that should be enabled. For example: | ||
|
||
@pytest.mark.enable_features("build_secrets") | ||
def test_with_build_secrets(...) | ||
""" | ||
features = {} | ||
|
||
for feature_marker in request.node.iter_markers("enable_features"): | ||
for feature_name in feature_marker.args: | ||
features[feature_name] = True | ||
|
||
return features |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we do not use any features in Snapcraft, so why have this?
to set things straight, I would say, rebase and drop 4f492aa and work on extending the fixtures we have with the things we need |
7777f02
to
6e25c37
Compare
@syu-w you did not seem to extend anything still, you moved the fixtures from tests/unit/conftest.py to tests/conftests.py. What is the justification for this? |
The snap command test only need to add the |
6e25c37
to
5463ba7
Compare
5463ba7
to
564136e
Compare
Rebase with no changes. |
@syu-w not sure if you are aware but there are a lot of new spread test failures
|
No description provided.