-
Notifications
You must be signed in to change notification settings - Fork 946
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] Fix missing entities in shared Report (#8333) #8366
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8366 +/- ##
==========================================
+ Coverage 66.18% 66.30% +0.11%
==========================================
Files 597 597
Lines 60392 60532 +140
Branches 6207 6323 +116
==========================================
+ Hits 39972 40133 +161
+ Misses 20420 20399 -21 ☔ View full report in Codecov by Sentry. |
d1085f9
to
8d65d17
Compare
f8359b7
to
558e6c1
Compare
bdfc3a5
to
c88f56c
Compare
c88f56c
to
33f0c27
Compare
@@ -401,7 +401,7 @@ const executeRuleElementRescan = async (context, user, actionContext, element) = | |||
} | |||
} | |||
}; | |||
const executeShare = async (context, user, actionContext, element) => { | |||
export const executeShare = async (context, user, actionContext, element) => { |
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.
no needed finally
expect(organizationSharingQueryResult?.data?.stixCoreObjectEdit.restrictionOrganizationAdd.objectOrganization[0].name).toEqual(TEST_ORGANIZATION.name); | ||
|
||
// Need background task magic to happens for sharing | ||
await taskHandler(); |
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.
This is a kind of hack, not sure of this. But we will have some random issue if the manager has not run before next test. The alternative would be to do this test at domain level in taskManager-test, calling taskManager.executeShare.
9bad91d
to
5c0c5e2
Compare
5c0c5e2
to
eef416b
Compare
f9bc7e9
to
0235ea3
Compare
0235ea3
to
661db60
Compare
@@ -67,7 +67,7 @@ schemaRelationsRefDefinition.registerRelationsRef(ENTITY_TYPE_CONTAINER_GROUPING | |||
schemaRelationsRefDefinition.registerRelationsRef(ENTITY_TYPE_VULNERABILITY, [objectOrganization]); | |||
|
|||
schemaRelationsRefDefinition.registerRelationsRef(ENTITY_TYPE_IDENTITY_SYSTEM, [objectOrganization]); | |||
schemaRelationsRefDefinition.registerRelationsRef(ENTITY_TYPE_IDENTITY_SECTOR, []); | |||
schemaRelationsRefDefinition.registerRelationsRef(ENTITY_TYPE_IDENTITY_SECTOR, [objectOrganization]); |
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.
Sectors shouldn't have organization restriction (part of unrestricted entities)
Proposed changes
System
andIndividual
in STIX_ORGANIZATIONS_UNRESTRICTEDRelated issues
Checklist
Further comments