-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Update mssql.go #6356
Update mssql.go #6356
Conversation
query will run on the database passed as the parameter instead of the master database
Hi @kedarkale27 ! Thanks for working on this. So I pulled it locally, merged in master, and ran Would you be willing to write an additional test that covers this code, just so that we can be sure it's working and so we can have a test documenting how it's intended to be used? Thanks! |
Added unit test case
Hi @tyrannosaurus-becks the test case has been added to verify the updated code. Can you please check and approve ? Thanks! |
Hi @kedarkale27 , thanks for adding that test. When I pull the PR and try to run it, I get:
|
updated the test case, schema is now written in double quotes
added a new line at the end of the code
Hi @tyrannosaurus-becks , I have modified the test case to solve this above mentioned error. Can you please check now ? |
Hi @kedarkale27 , I ran the test again, and received this output:
Let me share with you how I'm testing. First, I run MSSQL locally using Docker, like this:
Then, I run the new test locally using the following environment variables:
Once you've gotten the test working, can you please post the output the command line gives you showing the test is successful? Like from running it there, and then viewing the success response? Once you've got that posted, I'd be happy to re-review this PR. Thanks! |
adding schema env variable
Hi @tyrannosaurus-becks Please let me know if I am missing any step May be you need create a new environment variable MSSQL_SCHEMA which will point to the schema created in the MSSQl server which is other than dbo? just suggesting. Also can you please specify the MSSQL version you are using ? |
@kedarkale27 the version I'm on is It would be very helpful if these tests can pass using a Docker image because otherwise we may not be able to duplicate your test environment; however, let's figure out what you're using first. |
@tyrannosaurus-becks , Steps performed by me:
My current Vault code setup does not point to any SQL sever while running the test. It just runs the test simply like maven test. Can you please share the steps that I have to perform to setup my environment to use a SQL server that I have. Also can you please share the commands that i have to use to run and test the test case. Sorry for the inconvenience caused to you, please help. |
Hi @kedarkale27 , Ah, gotcha! Well, I think it would be better if we used Docker for testing rather than your test environment. The reason is, we can use Docker and its available images for tests (for free); whereas we won't be able to necessarily duplicate your test environment for our automated tests because we don't have an MSSQL license. If we can't create a test environment in the future, that means we can't make future changes to the code and know whether we're breaking things. So, I'd recommend installing Docker, and then getting it working using those test steps above here. I hope that helps! |
Issue with GO Lang not able to execute the USE database line. Fixed the issue by using the database where it is called
Hi @tyrannosaurus-becks, |
Hi @tyrannosaurus-becks , |
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.
Thanks @kedarkale27 ! It's working for me too. Much appreciated.
Thank you @tyrannosaurus-becks ! Can you please let me know when this code will be a part of the main branch ? or when it will be released ? |
query will run on the database passed as the parameter instead of the master database.
This seems the issue of the Go lang
even if we are executing the command use database
the database is not getting selected and the select query runs on the master database
this returns no results if we have a pre-created schema in another database