File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -43,3 +43,6 @@ def AptInstall(vm):
4343 location = _DEB_FILE_LOCATION ))
4444 vm .RemoteCommand ('sudo apt-get update' )
4545 vm .RemoteCommand ('sudo ACCEPT_EULA=Y /usr/bin/apt-get -y install mssql-tools' )
46+ vm .RemoteCommand ('echo "alias sqlcmd=\' /opt/mssql-tools/bin/sqlcmd\' "'
47+ ' >> ~/.bashrc' )
48+ vm .RemoteCommand ('source ~/.bashrc' )
Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ def InstallPackages(self):
199199
200200 def MakeSqlCommand (self , command : str , database_name = '' ):
201201 """See base class."""
202- sqlserver_command = '/opt/mssql-tools/bin/ sqlcmd -S %s -U %s -P %s ' % (
202+ sqlserver_command = 'sqlcmd -S %s -U %s -P %s ' % (
203203 self .connection_properties .endpoint ,
204204 self .connection_properties .database_username ,
205205 self .connection_properties .database_password )
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ def testMakeSqlserverCommand(self):
184184 db .endpoint = '1.1.1.1'
185185 self .assertEqual (
186186 db .client_vm_query_tools .MakeSqlCommand ('Select 1' ),
187- '/opt/mssql-tools/bin/ sqlcmd -S 1.1.1.1 -U root -P perfkitbenchmarker -Q "Select 1"'
187+ 'sqlcmd -S 1.1.1.1 -U root -P perfkitbenchmarker -Q "Select 1"'
188188 )
189189
190190 def testMakeSqlserverCommandWithLocalHost (self ):
@@ -195,7 +195,7 @@ def testMakeSqlserverCommandWithLocalHost(self):
195195 db .endpoint = '1.1.1.1'
196196 self .assertEqual (
197197 db .server_vm_query_tools .MakeSqlCommand ('Select 1' ),
198- '/opt/mssql-tools/bin/ sqlcmd -S localhost -U root -P perfkitbenchmarker -Q "Select 1"'
198+ 'sqlcmd -S localhost -U root -P perfkitbenchmarker -Q "Select 1"'
199199 )
200200
201201 def testInstallMYSQLServer (self ):
You can’t perform that action at this time.
0 commit comments