Skip to content

fix(cli): ca and certs are not included in loading db from CLI#8111

Merged
ihexxa merged 5 commits into
developfrom
fix/cli/cert
Oct 28, 2024
Merged

fix(cli): ca and certs are not included in loading db from CLI#8111
ihexxa merged 5 commits into
developfrom
fix/cli/cert

Conversation

@ihexxa

@ihexxa ihexxa commented Oct 22, 2024

Copy link
Copy Markdown
Contributor

Changes

  • fix: ca and certs are not included in loading db
  • Added a test for cert db loading
  • Added a test for settings db loading

Ref: INS-4598

@ihexxa ihexxa self-assigned this Oct 22, 2024
@ihexxa ihexxa changed the title fix: ca and certs are not included in loading db fix(CLI): ca and certs are not included in loading db from CLI Oct 22, 2024
@ihexxa ihexxa changed the title fix(CLI): ca and certs are not included in loading db from CLI fix(cli): ca and certs are not included in loading db from CLI Oct 22, 2024
filfreire
filfreire previously approved these changes Oct 22, 2024
@filfreire filfreire requested review from a team, CurryYangxx and gatzjames October 22, 2024 10:48
@ihexxa ihexxa enabled auto-merge (squash) October 22, 2024 11:14
ryan-willis
ryan-willis previously approved these changes Oct 22, 2024

@jackkav jackkav left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this just a plumbing PR or is there a case that works now that didn't before? The word fix implies something wasn't working before, if that is the case there probably could be a test case to show what it was.

@ihexxa

ihexxa commented Oct 23, 2024

Copy link
Copy Markdown
Contributor Author

Let me take a look and cover it, originally it was a quick fix but as more changes will be introduced, setting it to draft.

@ihexxa ihexxa marked this pull request as draft October 23, 2024 07:45
auto-merge was automatically disabled October 23, 2024 07:45

Pull request was converted to draft

@ihexxa ihexxa dismissed stale reviews from ryan-willis and filfreire via 82b4275 October 24, 2024 08:52
Comment thread packages/insomnia-inso/src/db/fixtures/certs/fake_key.pem Fixed
@ihexxa

ihexxa commented Oct 25, 2024

Copy link
Copy Markdown
Contributor Author

Added tests with fake db, certs. The cert test will load the fake cert although it will finally fail, which should be ok.
And the settings test will load settings db and doesn't follow the 302 redirection as allowRedirect is disabled in settings. I choose testing this option because almost any setting potentially could affect existing tests' behavior.

@ihexxa ihexxa marked this pull request as ready for review October 25, 2024 07:16
@@ -0,0 +1 @@
fake key content

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

for a future PR pass I recommend we also try with a working cert

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

+1 originally I added one but the key was blamed by the github bot above, probably we could try with cert. 🥹

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can't you ignore the GitHub bot? A happy test is more valuable than a sad one.

console.log(result);
}
expect(result.stdout).toContain('Adding SSL PEM certificate');
expect(result.stdout).toContain('Adding SSL KEY certificate');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@ihexxa ihexxa enabled auto-merge (squash) October 25, 2024 09:30
@jackkav

jackkav commented Oct 27, 2024

Copy link
Copy Markdown
Contributor

It's easier to fix this test later if you isolate the case using a yml input rather than nedb one and would fit the convention of the other tests in this group you're adding to.

@ihexxa ihexxa merged commit c82680a into develop Oct 28, 2024
@ihexxa ihexxa deleted the fix/cli/cert branch October 28, 2024 03:27
@ihexxa

ihexxa commented Oct 28, 2024

Copy link
Copy Markdown
Contributor Author

@jackkav I agree with your points about testing tls connection and tests with yml, as this PR mainly focuses on fixing data loading so I propose to extend it in the next.

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.

5 participants