Skip to content

feat: add config-manager push test - #124

Open
dallinjsevy wants to merge 2 commits into
mainfrom
feature/config-manager-push-test
Open

feat: add config-manager push test#124
dallinjsevy wants to merge 2 commits into
mainfrom
feature/config-manager-push-test

Conversation

@dallinjsevy

Copy link
Copy Markdown

No description provided.

@phalestrivir phalestrivir left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the idea to go ahead and merge the test commands into "one" command to avoid doing the same thing multiple times. Since we don't have a frodo command that does this either, I created one, and the config-manager test commands use it.

This will be nice I think since config-manager does a similar thing, and we might as well have a frodo command that does it as well.

Note that we want the commands to work for any deployment, and also that I simplified the command, so I made those changes as part when creating the conn test command.

There are still some tests that need to be created for these commands, so see my comments below.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need a test like this for frodo conn test as well

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking we should have a test for testFail as well where we attempt connecting using invalid credentials. That would look something like this:

test('"frodo config-manager push test": should fail connection with invalid credentials"', async () => {
  const CMD = `frodo config-manager push test ${c.host} ${c.realm} username password`;
  await testFail(CMD, env);
});

The other thing is we'll want the tests for config-manager-pull-test and conn-test to match these tests exactly, with the only difference being the command being run.

Comment on lines +69 to +71
const output = await exec(CMD, env);
expect(output.stdout).toMatchSnapshot();
expect(output.stderr).toMatchSnapshot();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use await testSuccess(CMD, env); here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants