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

[backend] Add the default Assets logic to scenario creation and update #2161

Merged
merged 18 commits into from
Jan 7, 2025

Conversation

heditar
Copy link
Contributor

@heditar heditar commented Jan 3, 2025

Proposed changes

  • implemented the logic to automatically add default assets at the creation of injects
  • updated the existing api to update simulation/scenario to add the default assets to the injects if the applyRule parameter is passed to the api

-> I didn't not add api tests as I was struggling to make them work, it will be added in a follow up PR

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality
  • For bug fix -> I implemented a test that covers the bug

Copy link

codecov bot commented Jan 3, 2025

Codecov Report

Attention: Patch coverage is 90.36145% with 8 lines in your changes missing coverage. Please review.

Project coverage is 33.26%. Comparing base (a92c8f0) to head (c7d0ec2).
Report is 4 commits behind head on release/1.11.0.

Files with missing lines Patch % Lines
...ain/java/io/openbas/rest/exercise/ExerciseApi.java 0.00% 4 Missing ⚠️
...ain/java/io/openbas/rest/scenario/ScenarioApi.java 50.00% 2 Missing ⚠️
...as/rest/exercise/form/ExerciseUpdateTagsInput.java 0.00% 1 Missing ⚠️
...as/rest/scenario/form/ScenarioUpdateTagsInput.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##             release/1.11.0    #2161      +/-   ##
====================================================
- Coverage             36.56%   33.26%   -3.30%     
+ Complexity             1505     1400     -105     
====================================================
  Files                   546      546              
  Lines                 16630    16707      +77     
  Branches               1061     1062       +1     
====================================================
- Hits                   6080     5558     -522     
- Misses                10241    10919     +678     
+ Partials                309      230      -79     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@heditar heditar merged commit 603fec1 into release/1.11.0 Jan 7, 2025
6 checks passed
@heditar heditar deleted the issue/1998-2 branch January 7, 2025 16:47
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