File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,7 @@ export const MINIMAL_V1_ENDPOINT: ManifestEndpoint = {
19
19
minInstances : RESET_VALUE ,
20
20
serviceAccountEmail : RESET_VALUE ,
21
21
timeoutSeconds : RESET_VALUE ,
22
- vpc : {
23
- connector : RESET_VALUE ,
24
- egressSettings : RESET_VALUE ,
25
- } ,
22
+ vpc : RESET_VALUE ,
26
23
} ;
27
24
28
25
export const FULL_ENDPOINT : ManifestEndpoint = {
Original file line number Diff line number Diff line change 23
23
import { expect } from "chai" ;
24
24
25
25
import * as functions from "../../src/v1" ;
26
+ import { ResetValue } from "../../src/common/options" ;
26
27
27
28
describe ( "FunctionBuilder" , ( ) => {
28
29
before ( ( ) => {
@@ -225,7 +226,11 @@ describe("FunctionBuilder", () => {
225
226
. auth . user ( )
226
227
. onCreate ( ( user ) => user ) ;
227
228
228
- expect ( fn . __endpoint . vpc . connector ) . to . equal ( "test-connector" ) ;
229
+ if ( ! ( fn . __endpoint . vpc instanceof ResetValue ) ) {
230
+ expect ( fn . __endpoint . vpc . connector ) . to . equal ( "test-connector" ) ;
231
+ } else {
232
+ expect . fail ( "__endpoint.vpc unexpectedly set to RESET_VALUE" ) ;
233
+ }
229
234
} ) ;
230
235
231
236
it ( "should allow a vpcConnectorEgressSettings to be set" , ( ) => {
@@ -237,7 +242,11 @@ describe("FunctionBuilder", () => {
237
242
. auth . user ( )
238
243
. onCreate ( ( user ) => user ) ;
239
244
240
- expect ( fn . __endpoint . vpc . egressSettings ) . to . equal ( "PRIVATE_RANGES_ONLY" ) ;
245
+ if ( ! ( fn . __endpoint . vpc instanceof ResetValue ) ) {
246
+ expect ( fn . __endpoint . vpc . egressSettings ) . to . equal ( "PRIVATE_RANGES_ONLY" ) ;
247
+ } else {
248
+ expect . fail ( "__endpoint.vpc unexpectedly set to RESET_VALUE" ) ;
249
+ }
241
250
} ) ;
242
251
243
252
it ( "should throw an error if user chooses an invalid vpcConnectorEgressSettings" , ( ) => {
You can’t perform that action at this time.
0 commit comments