nushell/crates/nu-command
Reilly Wood 0e2167884d
Add SSL tests for http get (#8327)
This PR adds tests to confirm that:
1. `http get` does the right thing (bail) when it encounters common SSL
errors
2. the `--insecure` flag works to ignore SSL errors

It's prompted by #8098, where `--insecure` stopped working and we didn't
notice until it was reported by a user.

## Deets + considerations

This PR uses [badssl.com](https://badssl.com/), a very handy website
affiliated with the Google Chrome team. The badssl authors mention that
stability is not guaranteed:

> Most subdomains are likely to have stable functionality, but anything
could change without notice.

I suspect that the badssl.com subdomains I've chosen will be stable
enough in practice. Can revisit this if the tests end up being flaky.

This PR does mean our tests are now making an external network call...
which I _think_ is OK. Our CI isn't exactly designed for offline
machines; test runners already have to download a bunch of crates etc. I
think the new tests are quick enough:


![image](https://user-images.githubusercontent.com/26268125/222992751-a9f0d8ff-b776-4ea5-908a-7d11607487fe.png)
2023-03-07 07:56:39 -08:00
..
assets refactor html module (#5246) 2022-04-20 08:50:14 -05:00
proptest-regressions/format_conversions add tests, deal with pipes, newlines, tabs for to nuon (#6391) 2022-09-01 14:08:19 +02:00
src Fix to json for SQLite databases (#8343) 2023-03-06 14:36:26 -08:00
tests Add SSL tests for http get (#8327) 2023-03-07 07:56:39 -08:00
Cargo.toml Bump rust-embed from 6.4.1 to 6.6.0 (#8330) 2023-03-05 19:36:14 -08:00
LICENSE Include license text in all crates (#5094) 2022-04-08 10:47:13 +02:00