Commit Graph

10 Commits

Author SHA1 Message Date
Ammar Bandukwala 2bd6d2908e
feat: convert entire CLI to clibase (#6491)
I'm sorry.
2023-03-23 17:42:20 -05:00
Ammar Bandukwala f05609b4da
chore: format Go more aggressively 2023-02-18 18:32:09 -06:00
Mathias Fredriksson 26ab0d37c1
fix: Protect codersdk.Client SessionToken so it can be updated (#4965)
This feature is used by the coder agent to exchange a new token. By
protecting the SessionToken via mutex we ensure there are no data races
when accessing it.
2022-11-09 15:31:24 +02:00
Mathias Fredriksson 6916d34458
fix: Fix cleanup in test helpers, prefer `defer` in tests (#3113)
* fix: Change uses of t.Cleanup -> defer in test bodies

Mixing t.Cleanup and defer can lead to unexpected order of execution.

* fix: Ensure t.Cleanup is not aborted by require

* chore: Add helper annotations
2022-07-25 19:22:02 +03:00
Kyle Carberry dc58d1b734
fix: Update text in logout tests (#2851)
This fixes CI!
2022-07-07 21:46:31 -05:00
Abhineet Jain d623eeb8d1
feat: delete API token in /logout API (#1770)
* delete API token in logout api

* add deleteapikeybyid to databasefake

* set blank cookie on logout always

* refactor logout flow, add unit tests

* update logout messsage

* use read-only file mode for windows

* fix file mode on windows for cleanup

* change file permissions on windows

* assert error is not nil

* refactor cli

* try different file mode on windows

* try different file mode on windows

* try keeping the files open on Windows

* fix the error message on Windows
2022-05-27 16:47:03 -04:00
Abhineet Jain 7ba6449054
Improve CLI logout flow (#1692)
* Improve CLI logout flow

* Fix lint error

* Make notLoggedInMessage a const

* successful logout with a msg when cfg files are absent

* use require, os.remove, show only one message, add prompt
2022-05-24 13:11:01 -04:00
Cian Johnston c2f74f3cc2
chore: avoid concurrent usage of t.FailNow (#1683)
* chore: golangci: add linter rule to report usage of t.FailNow inside goroutines
* chore: avoid t.FailNow in goroutines to appease the race detector
2022-05-24 08:58:39 +01:00
Spike Curtis d1817310a1
fix build and lint (#1613)
Signed-off-by: Spike Curtis <spike@coder.com>
2022-05-19 23:28:29 +00:00
Garrett Delfosse 077f16ce2c
feat: add coder logout command (#1609) 2022-05-19 22:42:32 +00:00