- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 215
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
MySQL add isRoot
parameter to executeQuery
#882
MySQL add isRoot
parameter to executeQuery
#882
Conversation
✅ Deploy Preview for testcontainers-node ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
const queryResult = await container.executeQuery("SELECT 1 as res"); | ||
expect(queryResult).toEqual(expect.stringContaining("res\n1\n")); | ||
|
||
// Test root user | ||
const rootQueryResult = await container.executeQuery("SELECT CURRENT_USER() as user"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this test test the new isRoot
parameter? Also please add a separate test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we go, fixed. I apologise for the incomplete PR, I don't know what happened.
I kept the "test non-root and root in the same test" approach as is done in the "should work with database URI" test
da1a560
to
b8118db
Compare
@jeengbe The new test is failing, could you take a look? |
It's weird that this test is failing; this implies that |
isRoot
parameter to executeQuery
isRoot
parameter to executeQuery
It's convenient to be able to perform root operations directly on the container. The parameter is optional and defaults to the current behaviour, so it's no breaking change.