I am trying to get my integration tests included in my CI build.
I would like to deploy a database project to the VSTS (localDB) instance so I can run my unit tests.
So far I have the SQL local db installed during the build this helped
I also found this PS script to deploy the dacpac to the localDb (works fine locally).
However the login is failing when I run the script.
I tried changing the connection string to IntegratedSecurity=True - but that didn't work.
How do I go about adding the login for the test database?
I ended up figuring this out. Turns out my error was in the last part of the PS script that I found.
I simply removed it (it only surfaces the details of the table created).
Bottom line is I get the (localDb)\v12.0 created and the database project deployed (dacpac) during the build process so all of my integration tests can run in VSTS CI.
One last note to anyone who trips up on this - remove the Integrated Security=True from the dac service connection:
you connection should read "Data Source=(localDb)\v12.0;Pooling=False;"