Skip to content

Commit a351495

Browse files
committed
Move most Windows SideBySide tests from Appveyor to Azure Pipelines.
1 parent e6be027 commit a351495

File tree

2 files changed

+79
-22
lines changed

2 files changed

+79
-22
lines changed

.ci/test.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ pushd .\tests\SideBySide
2828

2929
echo "Executing tests with No Compression, No SSL"
3030
Copy-Item -Force ..\..\.ci\config\config.json config.json
31-
dotnet test -c Release
31+
dotnet test -c Release -f net452
32+
if ($LASTEXITCODE -ne 0){
33+
exit $LASTEXITCODE;
34+
}
35+
dotnet test -c Release -f netcoreapp1.1.2
3236
if ($LASTEXITCODE -ne 0){
3337
exit $LASTEXITCODE;
3438
}

azure-pipelines.yml

Lines changed: 74 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
inputs:
5656
command: 'test'
5757
arguments: 'tests\MySqlConnector.Tests\MySqlConnector.Tests.csproj -c Baseline'
58+
testRunTitle: 'Baseline unit tests'
5859
- task: DotNetCoreCLI@2
5960
displayName: 'Restore packages'
6061
inputs:
@@ -65,7 +66,8 @@ jobs:
6566
displayName: 'Baseline tests'
6667
inputs:
6768
command: 'test'
68-
arguments: 'tests\SideBySide\SideBySide.csproj -c Baseline --logger'
69+
arguments: 'tests\SideBySide\SideBySide.csproj -c Baseline'
70+
testRunTitle: 'Baseline tests'
6971
env:
7072
DATA__UNSUPPORTEDFEATURES: 'Ed25519,UnixDomainSocket'
7173
DATA__CONNECTIONSTRING: 'server=localhost;port=3306;user id=root;password=test;database=mysqltest;ssl mode=none;DefaultCommandTimeout=3600'
@@ -91,41 +93,92 @@ jobs:
9193

9294
- job: windows_unit_tests
9395
dependsOn: windows_build
94-
displayName: 'Windows Unit Tests'
96+
displayName: 'Windows Tests'
9597
pool:
9698
vmimage: 'windows-latest'
9799
steps:
100+
- template: '.ci/install-mysql-windows.yml'
101+
- task: UseDotNet@2
102+
displayName: 'Install .NET Core 2.1'
103+
inputs:
104+
version: '2.1.805'
105+
- task: UseDotNet@2
106+
displayName: 'Install .NET Core'
107+
inputs:
108+
version: $(DotNetCoreSdkVersion)
98109
- template: '.ci/mysqlconnector-tests-steps.yml'
110+
- template: '.ci/conformance-test-steps.yml'
111+
parameters:
112+
image: 'mysql:8.0'
113+
connectionString: 'server=localhost;port=3306;user id=mysqltest;password=test;database=conformance;ssl mode=none;DefaultCommandTimeout=3600;AllowPublicKeyRetrieval=True'
99114

100115
- job: windows_integration_tests
101-
dependsOn: windows_build
102116
displayName: 'Windows Integration Tests'
103117
pool:
104118
vmimage: 'windows-latest'
105119
steps:
106120
- template: '.ci/install-mysql-windows.yml'
121+
- task: UseDotNet@2
122+
displayName: 'Install .NET Core 2.1'
123+
inputs:
124+
version: '2.1.805'
107125
- task: UseDotNet@2
108126
displayName: 'Install .NET Core'
109127
inputs:
110128
version: $(DotNetCoreSdkVersion)
111-
- template: '.ci/conformance-test-steps.yml'
112-
parameters:
113-
image: 'mysql:8.0'
114-
connectionString: 'server=localhost;port=3306;user id=mysqltest;password=test;database=conformance;ssl mode=none;DefaultCommandTimeout=3600;AllowPublicKeyRetrieval=True'
115-
- template: '.ci/sidebyside-test-steps.yml'
116-
parameters:
117-
image: 'mysql:8.0'
118-
unsupportedFeatures: 'Ed25519,Tls11,UnixDomainSocket'
119-
connectionString: 'server=localhost;port=3306;user id=mysqltest;password=test;database=mysqltest;ssl mode=none;DefaultCommandTimeout=3600;AllowPublicKeyRetrieval=True'
120-
platform: 'netcoreapp3.0'
121-
description: 'No SSL'
122-
- template: '.ci/sidebyside-test-steps.yml'
123-
parameters:
124-
image: 'mysql:8.0'
125-
unsupportedFeatures: 'Ed25519,Tls11,UnixDomainSocket'
126-
connectionString: 'server=localhost;port=3306;user id=mysqltest;password=test;database=mysqltest;ssl mode=none;UseCompression=True;DefaultCommandTimeout=3600;AllowPublicKeyRetrieval=True'
127-
platform: 'netcoreapp3.0'
128-
description: 'Compression, No SSL'
129+
- task: CopyFiles@2
130+
displayName: 'Copy config.json'
131+
inputs:
132+
sourceFolder: '.ci/config'
133+
contents: 'config.json'
134+
targetFolder: 'tests/SideBySide'
135+
- task: PowerShell@2
136+
displayName: 'Remove .NET 4.5.2 and .NET Core 1.1.2 targets'
137+
inputs:
138+
targetType: 'inline'
139+
script: '(Get-Content .\tests\SideBySide\SideBySide.csproj -Raw).replace(''net452;'', '''').replace(''netcoreapp1.1.2;'', '''') | Set-Content .\tests\SideBySide\SideBySide.csproj'
140+
- task: DotNetCoreCLI@2
141+
displayName: 'Side by Side tests'
142+
inputs:
143+
command: 'test'
144+
projects: 'tests/SideBySide/SideBySide.csproj'
145+
arguments: '-c Release'
146+
testRunTitle: ${{ format('{0}, $(Agent.OS), {1}, {2}', 'mysql:8.0', 'all', 'No SSL') }}
147+
env:
148+
DATA__UNSUPPORTEDFEATURES: 'Ed25519,Tls11,UnixDomainSocket'
149+
DATA__CONNECTIONSTRING: 'server=localhost;port=3306;user id=mysqltest;password=test;database=mysqltest;ssl mode=none;DefaultCommandTimeout=3600;AllowPublicKeyRetrieval=True;UseCompression=True'
150+
151+
- job: windows_integration_tests_compression
152+
displayName: 'Windows Integration Tests (Compression)'
153+
pool:
154+
vmimage: 'windows-latest'
155+
steps:
156+
- template: '.ci/install-mysql-windows.yml'
157+
- task: UseDotNet@2
158+
displayName: 'Install .NET Core 2.1'
159+
inputs:
160+
version: '2.1.805'
161+
- task: UseDotNet@2
162+
displayName: 'Install .NET Core'
163+
inputs:
164+
version: $(DotNetCoreSdkVersion)
165+
- script: copy .ci\config\config.compression.json tests\SideBySide\config.json
166+
displayName: 'Copy config.json'
167+
- task: PowerShell@2
168+
displayName: 'Remove .NET 4.5.2 and .NET Core 1.1.2 targets'
169+
inputs:
170+
targetType: 'inline'
171+
script: '(Get-Content .\tests\SideBySide\SideBySide.csproj -Raw).replace(''net452;'', '''').replace(''netcoreapp1.1.2;'', '''') | Set-Content .\tests\SideBySide\SideBySide.csproj'
172+
- task: DotNetCoreCLI@2
173+
displayName: 'Side by Side tests'
174+
inputs:
175+
command: 'test'
176+
projects: 'tests/SideBySide/SideBySide.csproj'
177+
arguments: '-c Release'
178+
testRunTitle: ${{ format('{0}, $(Agent.OS), {1}, {2}', 'mysql:8.0', 'all', 'No SSL, Compression') }}
179+
env:
180+
DATA__UNSUPPORTEDFEATURES: 'Ed25519,Tls11,UnixDomainSocket'
181+
DATA__CONNECTIONSTRING: 'server=localhost;port=3306;user id=mysqltest;password=test;database=mysqltest;ssl mode=none;DefaultCommandTimeout=3600;AllowPublicKeyRetrieval=True;UseCompression=True'
129182

130183
- job: linux_integration_tests
131184
dependsOn: linux_build

0 commit comments

Comments
 (0)