Skip to content

client: improved returns, debugging output#593

Merged
bobheadxi merged 13 commits into
masterfrom
client/#236-client-rework
Feb 27, 2019
Merged

client: improved returns, debugging output#593
bobheadxi merged 13 commits into
masterfrom
client/#236-client-rework

Conversation

@bobheadxi

@bobheadxi bobheadxi commented Feb 27, 2019

Copy link
Copy Markdown
Member

🎟️ Ticket(s): Closes #236


👷 Changes

oops... this turned out bigger than expected 😓

see #236 for context on this change

  • client returns are no longer http.Response, but relevant structures instead
  • to replace the loss of verbosity, a new --debug flag is now available to get debug output from the client
  • client's user functions are now in UserClient, which you can get using client.Client.GetUserClient()
  • improved use of context.Context for cleanliness of closure
  • marginally improved tests

🔦 Testing Instructions

~/go/src/github.com/ubclaunchpad/inertia client/#236-client-rework*
❯ make cli

~/go/src/github.com/ubclaunchpad/inertia client/#236-client-rework*
❯ ./inertia local logs       
failed to connect to daemon: dial tcp 127.0.0.1:4303: connect: connection refused

~/go/src/github.com/ubclaunchpad/inertia client/#236-client-rework*
❯ ./inertia local logs --debug
DEBUG: request constructed: wss://127.0.0.1:4303/logs?container=%2Finertia-daemon&stream=true (authorized: false, verified: false)
failed to connect to daemon: dial tcp 127.0.0.1:4303: connect: connection refused

@bobheadxi bobheadxi added the pr: finalized needs review and final approval label Feb 27, 2019
Comment thread client/users_test.go
defer testServer.Close()

var d = newMockClient(t, testServer).GetUserClient()
assert.NoError(t, d.RemoveUser(context.Background(), "yaoharry"))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

uwu

@codecov

codecov Bot commented Feb 27, 2019

Copy link
Copy Markdown

Codecov Report

Merging #593 into master will increase coverage by 0.32%.
The diff coverage is 63.16%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #593      +/-   ##
==========================================
+ Coverage   55.36%   55.68%   +0.32%     
==========================================
  Files          67       68       +1     
  Lines        3006     3226     +220     
==========================================
+ Hits         1664     1796     +132     
- Misses       1146     1197      +51     
- Partials      196      233      +37
Impacted Files Coverage Δ
cmd/core/utils/input/input.go 76.93% <0%> (-9.28%) ⬇️
daemon/inertiad/daemon/logs.go 0% <0%> (ø) ⬆️
client/bootstrap/bootstrap.go 75% <100%> (+0.65%) ⬆️
client/sshc.go 35.22% <23.34%> (-1.32%) ⬇️
client/users.go 61.54% <61.54%> (ø)
client/client.go 73.2% <72.44%> (-5.31%) ⬇️

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 9d630eb...2ac002c. Read the comment docs.

@bobheadxi bobheadxi merged commit 0d87ad0 into master Feb 27, 2019
@bobheadxi bobheadxi deleted the client/#236-client-rework branch February 27, 2019 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: finalized needs review and final approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants