testEqual reports whether the lbCfgs a and b are equal. This is to be used only from tests. This ignores the keyBuilderMap field because its internals are not exported, and hence not possible to specify in the want section of the test. This is fine because we already have tests to make sure that the
(a, b *lbConfig)
| 35 | // the test. This is fine because we already have tests to make sure that the |
| 36 | // keyBuilder is parsed properly from the service config. |
| 37 | func testEqual(a, b *lbConfig) bool { |
| 38 | return a.lookupService == b.lookupService && |
| 39 | a.lookupServiceTimeout == b.lookupServiceTimeout && |
| 40 | a.maxAge == b.maxAge && |
| 41 | a.staleAge == b.staleAge && |
| 42 | a.cacheSizeBytes == b.cacheSizeBytes && |
| 43 | a.defaultTarget == b.defaultTarget && |
| 44 | a.controlChannelServiceConfig == b.controlChannelServiceConfig && |
| 45 | a.childPolicyName == b.childPolicyName && |
| 46 | a.childPolicyTargetField == b.childPolicyTargetField && |
| 47 | childPolicyConfigEqual(a.childPolicyConfig, b.childPolicyConfig) |
| 48 | } |
| 49 | |
| 50 | // TestParseConfig verifies successful config parsing scenarios. |
| 51 | func (s) TestParseConfig(t *testing.T) { |
no test coverage detected