Skip to content
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

o/devicestate: preseeding test cleanup #11398

Merged
merged 5 commits into from Feb 17, 2022

Conversation

stolowski
Copy link
Contributor

  • pass "classic" flag to deviceMgrBaseSuite to allow creating device manager with mocked classic/core upfront. This doesn't prevent tests from overriding MockOnClassic later in the test but is important in case DeviceManager needs to know if it's on classic early in its init (important for core20/preseeding tests).
  • drop TestPreseedHappy which was pointless/misleading as it was actually run against core; TestPreseedOnClassicHappy covers real case.
  • renamed test suites from preseed* to preseeding*
  • some minor cleanups and sanity checks for classic.

Copy link
Contributor

@mardy mardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a question.

Copy link
Collaborator

@pedronis pedronis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you, two small remarks

overlord/devicestate/handlers_test.go Outdated Show resolved Hide resolved
overlord/devicestate/handlers_test.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Merging #11398 (dc86b35) into master (b1270c5) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #11398   +/-   ##
=======================================
  Coverage   78.38%   78.38%           
=======================================
  Files         931      931           
  Lines      106738   106738           
=======================================
+ Hits        83664    83667    +3     
+ Misses      17870    17868    -2     
+ Partials     5204     5203    -1     
Flag Coverage Δ
unittests 78.38% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
overlord/devicestate/firstboot.go 87.58% <0.00%> (-1.04%) ⬇️
overlord/hookstate/hookmgr.go 74.67% <0.00%> (-0.65%) ⬇️
overlord/ifacestate/handlers.go 65.02% <0.00%> (+0.14%) ⬆️
daemon/api_connections.go 93.58% <0.00%> (+0.53%) ⬆️
store/cache.go 71.15% <0.00%> (+1.92%) ⬆️
osutil/synctree.go 79.24% <0.00%> (+2.83%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b1270c5...dc86b35. Read the comment docs.

@mvo5 mvo5 merged commit ec5c191 into snapcore:master Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants