File tree
Expand file treeCollapse file tree3 files changed
+32
-1
lines changed Expand file treeCollapse file tree3 files changed
+32
-1
lines changed Original file line number | Diff line number | Diff line change |
---|
|
1 | 1 | - Fix reference docs for performance monitoring.
|
| 2 | +- Fix bug where function configuration wil null values couldn't be deployed. (#1246) |
Original file line number | Diff line number | Diff line change |
---|
@@ -7,6 +7,36 @@ describe('stackToWire', () => {
|
7 | 7 | params.clearParams();
|
8 | 8 | });
|
9 | 9 |
|
| 10 | +it('converts stack with null values values', () => { |
| 11 | +const stack: ManifestStack = { |
| 12 | +endpoints: { |
| 13 | +v2http: { |
| 14 | +platform: 'gcfv2', |
| 15 | +entryPoint: 'v2http', |
| 16 | +labels: {}, |
| 17 | +httpsTrigger: {}, |
| 18 | +maxInstances: null, |
| 19 | +}, |
| 20 | +}, |
| 21 | +requiredAPIs: [], |
| 22 | +specVersion: 'v1alpha1', |
| 23 | +}; |
| 24 | +const expected = { |
| 25 | +endpoints: { |
| 26 | +v2http: { |
| 27 | +platform: 'gcfv2', |
| 28 | +entryPoint: 'v2http', |
| 29 | +labels: {}, |
| 30 | +httpsTrigger: {}, |
| 31 | +maxInstances: null, |
| 32 | +}, |
| 33 | +}, |
| 34 | +requiredAPIs: [], |
| 35 | +specVersion: 'v1alpha1', |
| 36 | +}; |
| 37 | +expect(stackToWire(stack)).to.deep.equal(expected); |
| 38 | +}); |
| 39 | + |
10 | 40 | it('converts Expression types in endpoint options to CEL', () => {
|
11 | 41 | const intParam = params.defineInt('foo', { default: 11 });
|
12 | 42 | const stringParam = params.defineString('bar', {
|
|
Original file line number | Diff line number | Diff line change |
---|
@@ -107,7 +107,7 @@ export function stackToWire(stack: ManifestStack): Object {
|
107 | 107 | for (const [key, val] of Object.entries(obj)) {
|
108 | 108 | if (val instanceof Expression) {
|
109 | 109 | obj[key] = val.toCEL();
|
110 |
| -} else if (typeof val === 'object') { |
| 110 | +} else if (typeof val === 'object' && val !== null) { |
111 | 111 | traverse(val);
|
112 | 112 | }
|
113 | 113 | }
|
|
You can’t perform that action at this time.
0 commit comments