Skip to content

Commit 73b3dde

Browse files
authored
Merge pull request #1095 from mysql-net/azure
Run integration tests against Azure Database for MySQL.
2 parents 10d3886 + c1c1caf commit 73b3dde

File tree

4 files changed

+44
-2
lines changed

4 files changed

+44
-2
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,15 @@ This library is licensed under the [MIT License](LICENSE).
9292
## Contributing
9393

9494
If you'd like to contribute to MySqlConnector, please read our [contributing guidelines](.github/CONTRIBUTING.md).
95+
96+
## Acknowledgements
97+
98+
Development of MySqlConnector is supported by:
99+
100+
[![Faithlife](https://files.logoscdn.com/v1/files/4319104/content.svg?signature=3szVb3XmOfYMAxIv-LmuNYL_290)](https://faithlife.com/about)
101+
102+
[Faithlife](https://faithlife.com/about) ([View jobs](https://faithlife.com/careers))
103+
104+
[![Microsoft Azure](https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Microsoft_Azure.svg/75px-Microsoft_Azure.svg.png)](https://azure.microsoft.com/en-us/overview/open-source/)
105+
106+
[Azure Credits for Open Source](https://opensource.microsoft.com/azure-credits)

azure-pipelines.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,35 @@ jobs:
110110
image: 'mysql:8.0'
111111
connectionString: 'server=localhost;port=3306;user id=mysqltest;password=test;database=conformance;ssl mode=none;DefaultCommandTimeout=3600;AllowPublicKeyRetrieval=True'
112112

113+
- job: azure_mysql_integration_tests
114+
displayName: 'Azure MySQL Integration Tests'
115+
pool:
116+
vmimage: 'windows-latest'
117+
steps:
118+
- task: UseDotNet@2
119+
displayName: 'Install .NET Core'
120+
inputs:
121+
version: $(DotNetCoreSdkVersion)
122+
- task: PowerShell@2
123+
displayName: 'Copy Azure config'
124+
inputs:
125+
targetType: inline
126+
script: Copy-Item -Path ".\.ci\config\config.ssl.json" -Destination ".\tests\SideBySide\config.json"
127+
- task: DotNetCoreCLI@2
128+
displayName: 'Restore packages'
129+
inputs:
130+
command: 'restore'
131+
- task: DotNetCoreCLI@2
132+
displayName: 'Side by Side tests (net6.0)'
133+
inputs:
134+
command: 'test'
135+
projects: 'tests/SideBySide/SideBySide.csproj'
136+
arguments: '-c Release -f net6.0 --no-restore'
137+
testRunTitle: ${{ format('{0}, $(Agent.OS), {1}, {2}', 'Azure', 'net6.0', 'SSL') }}
138+
env:
139+
DATA__UNSUPPORTEDFEATURES: 'CachingSha2Password,Ed25519,GlobalLog,KnownCertificateAuthority,QueryAttributes,RsaEncryption,Sha256Password,Timeout,Tls11,Tls13,UnixDomainSocket'
140+
DATA__CONNECTIONSTRING: "$(AzureConnectionString);database=mysqltest;ssl mode=Required;DefaultCommandTimeout=3600;AllowPublicKeyRetrieval=True"
141+
113142
- job: windows_integration_tests_1
114143
displayName: 'Windows Integration Tests (Part 1)'
115144
pool:

tests/SideBySide/ServerFeatures.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ public enum ServerFeatures
2424
ResetConnection = 0x2_0000,
2525
ZeroDateTime = 0x4_0000,
2626
QueryAttributes = 0x8_0000,
27+
GlobalLog = 0x10_0000,
2728
}

tests/SideBySide/Transaction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public void DbConnectionCommit()
4343
Assert.Equal(new[] { 1, 2 }, results);
4444
}
4545

46-
[Theory]
46+
[SkippableTheory(ServerFeatures.GlobalLog)]
4747
[InlineData(IsolationLevel.ReadUncommitted, "read uncommitted")]
4848
[InlineData(IsolationLevel.ReadCommitted, "read committed")]
4949
[InlineData(IsolationLevel.RepeatableRead, "repeatable read")]
@@ -70,7 +70,7 @@ public void DbConnectionIsolationLevel(IsolationLevel inputIsolationLevel, strin
7070
}
7171

7272
#if !BASELINE
73-
[Theory]
73+
[SkippableTheory(ServerFeatures.GlobalLog)]
7474
[InlineData(IsolationLevel.ReadUncommitted, "start transaction")]
7575
[InlineData(IsolationLevel.ReadCommitted, "start transaction")]
7676
[InlineData(IsolationLevel.RepeatableRead, "start transaction")]

0 commit comments

Comments
 (0)