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 test coverage on indicator upsert issue (#5819). #5846

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

aHenryJard
Copy link
Member

@aHenryJard aHenryJard commented Feb 7, 2024

Proposed changes

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

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

input: {
toId: 'marking-definition--78ca4366-f5b8-4764-83f7-34ce38198e27',
toId: MARKING_TLP_GREEN,
Copy link
Member Author

Choose a reason for hiding this comment

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

This change on marking is done to make indicator-test run in standalone.

@aHenryJard aHenryJard added the filigran team use to identify PR from the Filigran team label Feb 7, 2024
Copy link

codecov bot commented Feb 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9ee0318) 65.02% compared to head (36ab5ac) 65.02%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5846   +/-   ##
=======================================
  Coverage   65.02%   65.02%           
=======================================
  Files         523      523           
  Lines       61449    61449           
  Branches     4942     4944    +2     
=======================================
  Hits        39959    39959           
  Misses      21490    21490           

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

@aHenryJard aHenryJard marked this pull request as ready for review February 7, 2024 18:54
expect(queryResult.data?.indicators.edges.length).toEqual(4);
const indicatorList: [] = queryResult.data?.indicators.edges;
expect(indicatorList).toBeDefined();
if (indicatorList) {
Copy link
Member

Choose a reason for hiding this comment

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

I suggest you do not check this ; you already expect it to be defined earlier so the test will fail explicitly.
it makes the code base more straightforward (dumb and simple I might say).

Copy link
Member Author

@aHenryJard aHenryJard Feb 8, 2024

Choose a reason for hiding this comment

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

deepscan is asking me to check it or it fails, maybe I'm missing something.... it seems that the expect is not enough

@aHenryJard aHenryJard merged commit 215c52f into master Feb 8, 2024
8 checks passed
@SouadHadjiat SouadHadjiat deleted the issues/5819-test-coverage branch February 13, 2024 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants