(restEndpoints, locationConstraints)
| 174 | } |
| 175 | |
| 176 | function restEndpointsAssert(restEndpoints, locationConstraints) { |
| 177 | assert(typeof restEndpoints === 'object', |
| 178 | 'bad config: restEndpoints must be an object of endpoints'); |
| 179 | assert(Object.keys(restEndpoints).every( |
| 180 | r => typeof restEndpoints[r] === 'string'), |
| 181 | 'bad config: each endpoint must be a string'); |
| 182 | assert(Object.keys(restEndpoints).every( |
| 183 | r => typeof locationConstraints[restEndpoints[r]] === 'object'), |
| 184 | 'bad config: rest endpoint target not in locationConstraints'); |
| 185 | } |
| 186 | |
| 187 | function gcpLocationConstraintAssert(location, locationObj) { |
| 188 | const { |
no outgoing calls
no test coverage detected