3278 Kusto Unit Tests - Part 1 (#1057)

* 3278 Added unit tests in MetadataFactoryTests and Microsoft.Kusto.ServiceLayer.UnitTests project

* 3278 Removed todo and changed unit test to validate megabytes

* 3278 Added file and unit tests in AutoCompleteHelperTests.cs

* 3278 Removed unused functions from Kusto > ScriptAsScriptingOperation

* 3278 Added unit tests for DataSourceFactory

* 3278 Refactored AdminService to pass in ConnectionService rather than through instance variable. Added unit test for AdminServiceTests

* 3278 Refactored DataSourceFactory to not have static functions for future unit tests

* 3278 Re-added properties that were flagged as unused but are being used by ADS in ReliableDataSourceConnection.cs

* 3278 Re-added properties that were flagged as unused but are being used by ADS in ReliableDataSourceConnection.cs

* adding pipeline to execute tests (#1062)

* 3278 Converted GetDefaultAutoComplete and GetDefaultSemanticMarkers to static functions in DataSourceFactory. Removed unused constructor in ScriptFile. Added positive unit tests for both functions

* undoing release version bump

* adding additional configs

* adressing feedback

* Correcting path in csproj

Co-authored-by: Jorge Berumen <52225468+joberume@users.noreply.github.com>
Co-authored-by: joberume <jberumen3@miners.utep.edu>
This commit is contained in:
Justin M
2020-08-31 11:11:12 -07:00
committed by GitHub
parent 07700560a6
commit 1577177153
26 changed files with 565 additions and 379 deletions

View File

@@ -45,17 +45,35 @@ steps:
projects: '$(Build.SourcesDirectory)/src/Microsoft.SqlTools.ServiceLayer'
arguments: '--configfile $(Build.SourcesDirectory)/nuget.config'
- task: DotNetCoreCLI@1
displayName: 'dotnet restore src/Microsoft.Kusto.ServiceLayer'
inputs:
command: restore
projects: '$(Build.SourcesDirectory)/src/Microsoft.Kusto.ServiceLayer'
arguments: '--configfile $(Build.SourcesDirectory)/nuget.config'
- task: DotNetCoreCLI@2
displayName: 'dotnet build src/Microsoft.SqlTools.ServiceLayer'
inputs:
projects: '$(Build.SourcesDirectory)/src/Microsoft.SqlTools.ServiceLayer'
- task: DotNetCoreCLI@2
displayName: 'dotnet build src/Microsoft.Kusto.ServiceLayer'
inputs:
projects: '$(Build.SourcesDirectory)/src/Microsoft.Kusto.ServiceLayer'
- task: DotNetCoreCLI@2
displayName: 'dotnet build src/Microsoft.SqlTools.ServiceLayer --configuration Release'
inputs:
projects: '$(Build.SourcesDirectory)/src/Microsoft.SqlTools.ServiceLayer '
arguments: '--configuration Release'
- task: DotNetCoreCLI@2
displayName: 'dotnet build src/Microsoft.Kusto.ServiceLayer --configuration Release'
inputs:
projects: '$(Build.SourcesDirectory)/src/Microsoft.Kusto.ServiceLayer '
arguments: '--configuration Release'
- task: BatchScript@1
displayName: 'Run script build.cmd'
inputs:
@@ -69,6 +87,12 @@ steps:
command: restore
projects: test/Microsoft.SqlTools.ServiceLayer.UnitTests
- task: DotNetCoreCLI@1
displayName: 'dotnet restore test/Microsoft.Kusto.ServiceLayer.UnitTests'
inputs:
command: restore
projects: test/Microsoft.Kusto.ServiceLayer.UnitTests
- task: DotNetCoreCLI@1
displayName: 'dotnet test test/Microsoft.SqlTools.ServiceLayer.UnitTests'
inputs:
@@ -76,6 +100,13 @@ steps:
projects: test/Microsoft.SqlTools.ServiceLayer.UnitTests
arguments: '--logger "trx;LogFileName=xunit.trx"'
- task: DotNetCoreCLI@1
displayName: 'dotnet test test/Microsoft.Kusto.ServiceLayer.UnitTests'
inputs:
command: test
projects: test/Microsoft.Kusto.ServiceLayer.UnitTests
arguments: '--logger "trx;LogFileName=xunit.trx"'
- task: Npm@1
displayName: 'npm install -g gulp-cli'
inputs:
@@ -221,4 +252,4 @@ schedules:
displayName: Mon-Fri at 5:00AM
branches:
include:
- main
- main

View File

@@ -64,4 +64,4 @@ schedules:
displayName: Mon-Fri at 7:00UTC
branches:
include:
- main
- main