Skip to content

feat: Add reset-password command #1380

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

Merged
merged 6 commits into from
May 12, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix linter errors
  • Loading branch information
dwahler committed May 10, 2022
commit bfa835d9914351692059000d67e327d51f76670e
3 changes: 2 additions & 1 deletion cli/resetpassword_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"

"github.com/coder/coder/cli/clitest"
"github.com/coder/coder/coderd/database/postgres"
"github.com/coder/coder/codersdk"
"github.com/coder/coder/pty/ptytest"
"github.com/stretchr/testify/require"
)

func TestResetPassword(t *testing.T) {
Expand Down
9 changes: 7 additions & 2 deletions coderd/database/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ func testSQLDB(t testing.TB) *sql.DB {
return db
}

// paralleltest linter doesn't correctly handle table-driven tests (https://github.com/kunwardeep/paralleltest/issues/8)
// nolint:paralleltest
func TestCheckLatestVersion(t *testing.T) {
t.Parallel()

Expand All @@ -102,12 +104,15 @@ func TestCheckLatestVersion(t *testing.T) {
}

for i, tc := range tests {
i, tc := i, tc
t.Run(fmt.Sprintf("entry %d", i), func(t *testing.T) {
t.Parallel()

driver, _ := stub.WithInstance(nil, &stub.Config{})
migrations := driver.(*stub.Stub).Migrations
stub, ok := driver.(*stub.Stub)
require.True(t, ok)
for _, version := range tc.existingVersions {
migrations.Append(&source.Migration{
stub.Migrations.Append(&source.Migration{
Version: version,
Identifier: "",
Direction: source.Up,
Expand Down