feat: add config-manager push iga-workflows command#103
Conversation
There was a problem hiding this comment.
For test configurations, I would update these workflows to have one of each possible node in them so we can test to verify that importing works for all nodes. Currently your test workflows only have the wait node.
| const { stdout } = await exec(CMD, igaEnv); | ||
| expect(removeAnsiEscapeCodes(stdout)).toMatchSnapshot(); |
There was a problem hiding this comment.
I would change these tests to use the await testSuccess(CMD, igaEnv); helper function I created to test success, as it helps simplify the tests some more.
|
Make sure to rebase with main once my PR here gets merged in: rockcarver#631 (or specifically rebase your pull branch with main, and then rebase this branch with your pull branch) |
d3b20b1 to
cb3a0cf
Compare
dd5b698 to
c7ab435
Compare
d7c9b12 to
6facd74
Compare
6facd74 to
fd8512e
Compare
c7ab435 to
c776688
Compare
c776688 to
da49a7e
Compare
bfb2276 to
fc013a0
Compare
da49a7e to
64771cc
Compare
phalestrivir
left a comment
There was a problem hiding this comment.
Two more things, and then we should be good to go. After making the changes, running lint, and making sure tests pass, squash your commits, and rebase with main before making PR against Rockcarver. I would probably wait until the pull-iga workflows is merged into main before you rebase and create the PR against Rockcarver
| await testSuccess(CMD, igaEnv); | ||
| }); | ||
| test(`"frodo config-manager push iga-workflows --draft -D ${allDirectory} ": should import the iga workflows into cloud tenant as draft workflows"`, async () => { | ||
| const CMD = `frodo config-manager push iga-workflows -D ${allDirectory} `; |
There was a problem hiding this comment.
This test is missing --draft from the CMD, so you are actually just running the first test here instead of the actual test.
| if (name) { | ||
| const workflowDir = `${workflowsPath}/${name}`; | ||
| if (!fs.existsSync(workflowDir)) { | ||
| throw new verboseMessage(`Requested workflow ${name} not found`); |
There was a problem hiding this comment.
When I was testing this I found this bug. You can't throw this, instead you should print an error first, and then return false:
printMessage(`Requested workflow ${name} not found`, 'error');
return false;bed5325 to
85fabc8
Compare
No description provided.