[AMSDK-10255] Make Identity a hard dependency for ExEdge requests#53
Merged
[AMSDK-10255] Make Identity a hard dependency for ExEdge requests#53
Conversation
…ssing event queue
…state. Functional tests verify Identity shared state is a hard dependency before sending a network request to ExEdge. Adds a FakeIdentityExtension which allows the setting and clearing of the Identity shared state. These function tests are added to a new Xcode target so they are run independently from other functional tests. This is needed now as there is currently no way to reset the SDK for testing.
…ner registration.
emdobrin
requested changes
Jul 28, 2020
| /* Begin PBXNativeTarget section */ | ||
| BF024B8024CF93DF002131E9 /* functionalTestsIdentity */ = { | ||
| isa = PBXNativeTarget; | ||
| buildConfigurationList = BF024B9624CF93DF002131E9 /* Build configuration list for PBXNativeTarget "functionalTestsIdentity" */; |
Contributor
There was a problem hiding this comment.
This makes me sad 😢 I wish we could reset the hub soon.
|
|
||
| /// Extension used to 'fake' an Identity extension and allows tests to clear and set the Identity shared state. Use it along with `FunctionalTestBase` | ||
| /// Cannot be used along with another Identity Extension which is registered with ACPCore. | ||
| class FakeIdentityExtension: ACPExtension { |
Contributor
There was a problem hiding this comment.
Can we make this extension more generic, something like FakeMobileExtension and be able to use this for any extension we need? The name needs to be customizable.
Contributor
Author
There was a problem hiding this comment.
We talked offline about this. It's difficult to make this customizable given how the extensions are registered in the SDK. This may become easier once we switch to the Swift Core, or once we have the ability to reset the SDK, we can use the actual Identity extension for testing.
Codecov Report
@@ Coverage Diff @@
## dev #53 +/- ##
==========================================
- Coverage 78.08% 77.69% -0.40%
==========================================
Files 29 29
Lines 981 995 +14
==========================================
+ Hits 766 773 +7
- Misses 215 222 +7 |
emdobrin
approved these changes
Jul 28, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
AEP Mobile Extension will not send network requests if Identity shared state is pending. If the Identity shared state exists, but no ECID exists, the network request is still sent without the ECID. This use-case will be revisited when opt-out controls are implemented as no ECID indicates the user has oped-out of Identity.
IdentityStateFunctionalTestsfor test cases which need to manipulate the Identity shared stateFakeIdentityExtensionwhich allows a unit tests to set and clear the Identity shared statefunctionalTestsIdentityto run these new tests independently of other functional tests. This is needed to reset the SDK of any previously registered Identity extension.Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: