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 @@ -40,10 +40,7 @@ export const MINIMAL_V1_ENDPOINT: ManifestEndpoint = {
40
40
minInstances : RESET_VALUE ,
41
41
serviceAccountEmail : RESET_VALUE ,
42
42
timeoutSeconds : RESET_VALUE ,
43
- vpc : {
44
- connector : RESET_VALUE ,
45
- egressSettings : RESET_VALUE ,
46
- } ,
43
+ vpc : RESET_VALUE ,
47
44
} ;
48
45
49
46
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