[AMSDK-11410] Add support for configurable testing endpoints#189
[AMSDK-11410] Add support for configurable testing endpoints#189nporter-adbe merged 4 commits intoadobe:devfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #189 +/- ##
==========================================
+ Coverage 94.18% 94.29% +0.11%
==========================================
Files 25 26 +1
Lines 893 910 +17
==========================================
+ Hits 841 858 +17
Misses 52 52 |
| private let exEdgeInteractUrl = URL(string: FunctionalTestConst.EX_EDGE_INTERACT_URL_STR)! // swiftlint:disable:this force_unwrapping | ||
| private let exEdgeInteractProdUrl = URL(string: FunctionalTestConst.EX_EDGE_INTERACT_PROD_URL_STR)! // swiftlint:disable:this force_unwrapping | ||
| private let exEdgeInteractPreProdUrl = URL(string: FunctionalTestConst.EX_EDGE_INTERACT_PRE_PROD_URL_STR)! // swiftlint:disable:this force_unwrapping | ||
| private let exEdgeInteractIntegrationUrl = URL(string: FunctionalTestConst.EX_EDGE_INTERACT_INTEGRATION_URL_STR)! // swiftlint:disable:this force_unwrapping |
There was a problem hiding this comment.
Should we disable this rule in Tests/TestUtils/.swiftlint.yml ?
There was a problem hiding this comment.
I would like to disable that rule, but I'd prefer to do it in a dedicated task/PR so that we can go through all the newly disabled rules and remove all the comment annotations throughout all our tests. Otherwise, I think we'll end up with many old unneeded swiftlint:disable comments.
I can create a task if you'd like.
emdobrin
left a comment
There was a problem hiding this comment.
Left a small comment, looks good otherwise
| } | ||
|
|
||
| let edgeEndpointStr = configSharedState[EdgeConstants.SharedState.Configuration.EDGE_ENVIRONMENT] as? String | ||
| let edgeEndpoint = EdgeEndpoint(optionalRawValue: edgeEndpointStr?.lowercased()) |
There was a problem hiding this comment.
can we move the lowercased inside EdgeEndpoint.init too?
There was a problem hiding this comment.
I don't mind lowercasing what we read from configuration, but I don't believe the actual enum should be case insensitive.
There was a problem hiding this comment.
The main reason being is I don't think an enum case should match many different values, rather only the explicit string it defines.
The following behavior I'd also find undesired:
let rawValue = "INT"
let endpoint = EdgeEndpoint(optionalRawValue: rawValue)
let equal = endpoint.rawValue == rawValue // false
Description
Implements: #84
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: