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

Firmware set fixes #228

Merged
merged 7 commits into from
Aug 16, 2023
Merged

Conversation

joelrebel
Copy link
Member

  • Updates referenced firmware delete constraint to RESTRICT in firmware set mapping.
  • Firmware set labels should not be purged unless client expects it.
  • Fixes up testtools/cleanDB() to error on table DeleteAll() errors.
  • A few Makefile touchups.

…lete as part of tests

The cleanDB() method is invoked multiple times for each test,
if a table cannot be deleted because of a constraint or some other
cause, this method will now log the error as part of the test.

This helps debug cause for failing tests quicker - in the case where the
DB tables were not cleaned up by cleanDB().
… deletion

When a firmware row is referenced by a firmware set, restrict deletion of the firmware row,
This ensures referential integrity in firmware sets.

Updates test for constraint check.
…nformation

This change splits up the serverComponentFirmwareSetUpdate() method
and implements some checks to ensure the firmware set attribute data
does not get overwritten to be empty as part of an update, unless its expected.

Adds additional tests to cover for firmware set attributes updates.
@joelrebel joelrebel requested a review from a team as a code owner August 15, 2023 08:49
@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Merging #228 (2463301) into main (94b3a8b) will increase coverage by 0.18%.
Report is 6 commits behind head on main.
The diff coverage is 69.23%.

@@            Coverage Diff             @@
##             main     #228      +/-   ##
==========================================
+ Coverage   71.69%   71.87%   +0.18%     
==========================================
  Files          36       36              
  Lines        3466     3549      +83     
==========================================
+ Hits         2485     2551      +66     
- Misses        734      745      +11     
- Partials      247      253       +6     
Flag Coverage Δ
unittests 71.87% <69.23%> (+0.18%) ⬆️

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

Files Changed Coverage Δ
pkg/api/v1/router_firmware_set.go 62.39% <60.00%> (+0.78%) ⬆️
internal/dbtools/testtools.go 82.60% <77.77%> (-6.49%) ⬇️

... and 6 files with indirect coverage changes

diogomatsubara
diogomatsubara previously approved these changes Aug 16, 2023
@joelrebel joelrebel merged commit 97b483f into metal-toolbox:main Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants