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

fix: update tests after ikg modifications #172

Merged
merged 1 commit into from
Nov 30, 2023
Merged

Conversation

cowan-macady
Copy link
Contributor

Closing ENG-2397

  • update tests after modification with tenant, identity properties, node type and labels
  • buf generation

@cowan-macady cowan-macady requested a review from a team as a code owner November 30, 2023 06:33
@cowan-macady cowan-macady requested review from zhekaby and maaland and removed request for zhekaby November 30, 2023 06:33
Copy link

codecov bot commented Nov 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (53af4f8) 71.21% compared to head (c59e1e6) 71.74%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #172      +/-   ##
==========================================
+ Coverage   71.21%   71.74%   +0.52%     
==========================================
  Files          39       39              
  Lines        2321     2304      -17     
==========================================
  Hits         1653     1653              
+ Misses        613      596      -17     
  Partials       55       55              

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

@@ -181,7 +149,7 @@ var _ = Describe("Ingestion", func() {
Expect(err).To(Succeed())
Expect(resp2).NotTo(BeNil())
id2 := resp2.Info.Changes[0].Id
Expect(id2).To(Equal(id))
Expect(id2).NotTo(Equal(id))
Copy link
Contributor

Choose a reason for hiding this comment

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

Wait, so you ingest the exact same node twice, and receive different ids?

Copy link
Contributor Author

@cowan-macady cowan-macady Nov 30, 2023

Choose a reason for hiding this comment

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

yes the behavior changed: before, when you created the same node twice, it did not create a new one but was just updating the old one.
Now it is the contrary: it deletes the old one and creates a new one.
Same for Resources which are not DT: the behavior changed too.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's a huge bug if true, I'll check

Copy link
Contributor

Choose a reason for hiding this comment

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

Confirmed, have a fix in my next PR

Comment on lines 1219 to 1220
Expect(err).To(MatchError(ContainSubstring("server was unable to complete the request")))
Expect(resp3).To(BeNil())
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not the intended behavior!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@@ -125,7 +125,7 @@ var _ = Describe("Authorized", func() {
resource1: PointTo(MatchFields(IgnoreExtras, Fields{
"Actions": MatchAllKeys(Keys{
action1: PointTo(MatchFields(IgnoreExtras, Fields{
"Allow": Equal(false),
"Allow": Equal(true),
Copy link
Contributor

Choose a reason for hiding this comment

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

why did this need to change?

Copy link
Contributor Author

@cowan-macady cowan-macady Nov 30, 2023

Choose a reason for hiding this comment

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

change of data. The goal is to get the right 2 answers, whatever they are

Copy link
Contributor

@maaland maaland left a comment

Choose a reason for hiding this comment

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

Approved, as long as the change in the AuthZ behavior actually was intended and needed to be changed in the test.

@cowan-macady cowan-macady merged commit b2166a4 into master Nov 30, 2023
10 checks passed
@cowan-macady cowan-macady deleted the update-authz-tests branch November 30, 2023 16:49
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