-
Notifications
You must be signed in to change notification settings - Fork 56
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
test: Remove hardcoded test identities #2822
test: Remove hardcoded test identities #2822
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2822 +/- ##
===========================================
- Coverage 79.14% 78.97% -0.17%
===========================================
Files 318 318
Lines 24162 24162
===========================================
- Hits 19122 19081 -41
- Misses 3663 3690 +27
- Partials 1377 1391 +14
Flags with carried forward coverage won't be shown. Click here to find out more. see 16 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
cafd0f2
to
2436eaa
Compare
2436eaa
to
8d341fc
Compare
@@ -23,7 +25,7 @@ func TestACP_AddPolicy_BasicYAML_ValidPolicyID(t *testing.T) { | |||
|
|||
Actions: []any{ | |||
testUtils.AddPolicy{ | |||
Identity: actor1Identity, | |||
Identity: immutable.Some(1), |
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.
question: why use index 1 if we never use index 0?
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.
I didn't think that hard about it :) actor*1*Identity => ID(1)
. I don't think this is important.
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.
Okay that makes sense. I thought there might be something else I'm missing.
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.
LGTM.
## Relevant issue(s) Resolves sourcenetwork#2821 ## Description Removes the hardcoded test identities from our integration tests. The current (develop) setup becomes impossible with source-hub ACP as the identity needs to include a signed bearer token containing the sourcehub address (not accessible during package init). I also think this is a bit more maintainable.
Relevant issue(s)
Resolves #2821
Description
Removes the hardcoded test identities from our integration tests.
The current (develop) setup becomes impossible with source-hub ACP as the identity needs to include a signed bearer token containing the sourcehub address (not accessible during package init).
I also think this is a bit more maintainable.
This commit has been broken out of #2657 to minimize the risk of conflicts and to keep the PRs focused. It might be useful for reviewers to have a quick look at the full (WIP)
getIdentity
func in the original PR.