Skip to content

Conversation

Johonsoy
Copy link
Contributor

  • Add a 1-second wait time before each test to ensure the database has started

  • Update error assertions to match more specific error messages

  • Adjust the test order: first test the case where the user does not exist, then test the case where the password is incorrect

Add a 1-second wait time before each test to ensure the database has started
Update error assertions to match more specific error messages
Adjust the test order: first test the case where the user does not exist, then test the case where the password is incorrect
Johonsoy added 3 commits May 24, 2025 00:16
Adjust code import order

- Adjust the import order of "github.com/gocraft/dbr/v2" to before "github.com/stretchr/testify/assert"
- This change does not add or remove any functionality, it just reorganizes the order of import statements
Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

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

The sleep seems fine, but the assertions you removed were actually testing things.

conn, err := dbr.Open("mysql", fmt.Sprintf("no_user:@tcp(%s:%d)/%s", address, port, dbName), nil)
require.NoError(t, err)
require.ErrorContains(t, conn.Ping(), "User not found")
Copy link
Member

Choose a reason for hiding this comment

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

Pretty sure we want to keep these around

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I reverted it,pls check again

Copy link
Member

Choose a reason for hiding this comment

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

I've been out of the office on leave, but this looks good.

@zachmu zachmu merged commit a5d281d into dolthub:main Aug 26, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants