From 8108079e8096d1a0f73b2642e746b2f44ac54025 Mon Sep 17 00:00:00 2001 From: geonhui-kim Date: Fri, 9 Apr 2021 12:02:35 +0900 Subject: [PATCH] Fix to not created cron job --- deploy/lib/deployTriggers.js | 3 +-- deploy/tests/deployTriggers.js | 11 +++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/deploy/lib/deployTriggers.js b/deploy/lib/deployTriggers.js index 7706ee2..a2fe5f9 100644 --- a/deploy/lib/deployTriggers.js +++ b/deploy/lib/deployTriggers.js @@ -35,7 +35,6 @@ module.exports = { }, getTriggers(triggers) { - const feedMask = { feed: undefined }; return Object.keys(triggers) .map(t => { const trigger = triggers[t]; @@ -49,7 +48,7 @@ module.exports = { }, }); } - return Object.assign(trigger, feedMask); + return trigger }); }, }; diff --git a/deploy/tests/deployTriggers.js b/deploy/tests/deployTriggers.js index 1acb2a8..72163ba 100644 --- a/deploy/tests/deployTriggers.js +++ b/deploy/tests/deployTriggers.js @@ -54,11 +54,19 @@ describe('deployTriggers', () => { { triggerName: 'myTrigger', namespace: 'myNamespace', - feed: undefined }, { triggerName: 'feedTrigger', namespace: 'feedNamespace', + feed: { + feedName: "alarms/alarm", + namespace: "whisk.system", + params: { + "cron": "* * * * *", + "trigger_payload": {} + }, + trigger: "/feedNamespace/feedTrigger" + }, trigger: { annotations: [ { @@ -67,7 +75,6 @@ describe('deployTriggers', () => { } ], }, - feed: undefined }, ], };