Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: switch from memfs to fstest.MapFS #327

Merged
merged 2 commits into from
Feb 18, 2022
Merged

Conversation

jawnsy
Copy link
Contributor

@jawnsy jawnsy commented Feb 18, 2022

  • Switch from memfs to built-in fstest.MapFS
  • Ensure httptest servers are closed during test cleanup
  • Swap ordering of expected/actual values in assertion functions
  • Use http.StatusOK constants for status codes
  • Add a 1-second context timeout for each request
  • Use the test httptest.Server.Client() so that we can handle
    TLS server certificates if desired

* Switch from memfs to built-in fstest.MapFS
* Ensure httptest servers are closed during test cleanup
* Swap ordering of expected/actual values in assertion functions
* Use http.StatusOK constants for status codes
* Add a 1-second context timeout for each request
* Use the test httptest.Server.Client() so that we can handle
  TLS server certificates if desired
@jawnsy jawnsy force-pushed the jawnsy/chore-memfs-to-fstest branch from bb3a94d to 3545416 Compare February 18, 2022 20:21
@jawnsy jawnsy self-assigned this Feb 18, 2022
@jawnsy jawnsy marked this pull request as ready for review February 18, 2022 20:22
@codecov
Copy link

codecov bot commented Feb 18, 2022

Codecov Report

Merging #327 (ec71732) into main (37bcfeb) will increase coverage by 3.87%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #327      +/-   ##
==========================================
+ Coverage   63.61%   67.49%   +3.87%     
==========================================
  Files          69      140      +71     
  Lines         786     7407    +6621     
  Branches       77       77              
==========================================
+ Hits          500     4999    +4499     
- Misses        271     1897    +1626     
- Partials       15      511     +496     
Flag Coverage Δ
unittest-go-macos-latest 66.09% <ø> (?)
unittest-go-ubuntu-latest 67.37% <ø> (?)
unittest-go-windows-latest 65.69% <ø> (?)
unittest-js 63.61% <ø> (ø)
Impacted Files Coverage Δ
pty/start_other.go 66.66% <0.00%> (ø)
httpmw/workspaceparam.go 76.47% <0.00%> (ø)
coderd/projectversion.go 55.22% <0.00%> (ø)
provisioner/terraform/parse.go 77.77% <0.00%> (ø)
coderd/users.go 58.76% <0.00%> (ø)
codersdk/client.go 58.46% <0.00%> (ø)
codersdk/workspaces.go 64.03% <0.00%> (ø)
peer/channel.go 82.45% <0.00%> (ø)
provisioner/terraform/provision.go 71.62% <0.00%> (ø)
httpmw/organizationparam.go 69.81% <0.00%> (ø)
... and 61 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 37bcfeb...ec71732. Read the comment docs.

Copy link
Member

@kylecarbs kylecarbs left a comment

Choose a reason for hiding this comment

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

Nice! Another dependency bites the dust!

@jawnsy jawnsy merged commit 5ef59e7 into main Feb 18, 2022
@jawnsy jawnsy deleted the jawnsy/chore-memfs-to-fstest branch February 18, 2022 21:03
@jawnsy jawnsy removed their assignment Mar 12, 2022
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.

None yet

2 participants