Skip to content

[release/3.1] Stop building on Ubuntu 18.04 #43666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .azure/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ stages:
parameters:
condition: ne(variables['SkipTests'], 'true')
jobName: Linux_Test
jobDisplayName: "Test: Ubuntu 18.04 x64"
jobDisplayName: "Test: Ubuntu x64"
agentOs: Linux
isTestingJob: true
buildArgs: --all --test "/p:RunTemplateTests=false" $(_InternalRuntimeDownloadArgs)
Expand Down Expand Up @@ -700,7 +700,7 @@ stages:
displayName: 'Test: Linux Source Build'
container: centos:7
pool:
vmImage: 'ubuntu-18.04'
vmImage: 'ubuntu-20.04'
variables:
LC_ALL: 'en_US.UTF-8'
LANG: 'en_US.UTF-8'
Expand Down
2 changes: 1 addition & 1 deletion .azure/pipelines/jobs/default-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
${{ if eq(parameters.agentOs, 'macOS') }}:
vmImage: macOS-11
${{ if eq(parameters.agentOs, 'Linux') }}:
vmImage: ubuntu-18.04
vmImage: ubuntu-20.04
${{ if eq(parameters.agentOs, 'Windows') }}:
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: NetCore-Public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public class TlsTests : LoggedTest

[ConditionalFact]
[OSSkipCondition(OperatingSystems.Windows)]
// Ubuntu 20.04 disables TLS1.1 by default which SslStream requires in this scenario.
// For now, we test only on macOS because we don't have checks for the specific Linux version.
[OSSkipCondition(OperatingSystems.Linux)]
public async Task TlsHandshakeRejectsTlsLessThan12()
{
using (var server = new TestServer(context =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ void ConfigureListenOptions(ListenOptions listenOptions)
using (var connection = server.CreateConnection())
{
var stream = OpenSslStreamWithCert(connection.Stream);
var ex = await Assert.ThrowsAsync<IOException>(
var ex = await Assert.ThrowsAnyAsync<Exception>(
async () => await stream.AuthenticateAsClientAsync("localhost", new X509CertificateCollection(), SslProtocols.Tls, false));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ public async Task ClientAttemptingToUseUnsupportedProtocolIsLoggedAsDebug()
using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true))
{
// SslProtocols.Tls is TLS 1.0 which isn't supported by Kestrel by default.
await Assert.ThrowsAsync<IOException>(() =>
await Assert.ThrowsAnyAsync<Exception>(() =>
sslStream.AuthenticateAsClientAsync("127.0.0.1", clientCertificates: null,
enabledSslProtocols: SslProtocols.Tls,
checkCertificateRevocation: false));
Expand All @@ -384,36 +384,6 @@ await Assert.ThrowsAsync<IOException>(() =>
Assert.Equal(LogLevel.Debug, loggerProvider.FilterLogger.LastLogLevel);
}

[ConditionalFact]
[OSSkipCondition(OperatingSystems.Windows)]
public async Task DevCertWithInvalidPrivateKeyProducesCustomWarning()
{
var loggerProvider = new HandshakeErrorLoggerProvider();
LoggerFactory.AddProvider(loggerProvider);

await using (var server = new TestServer(context => Task.CompletedTask,
new TestServiceContext(LoggerFactory),
listenOptions =>
{
listenOptions.UseHttps(TestResources.GetTestCertificate());
}))
{
using (var connection = server.CreateConnection())
using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true))
{
// SslProtocols.Tls is TLS 1.0 which isn't supported by Kestrel by default.
await Assert.ThrowsAsync<IOException>(() =>
sslStream.AuthenticateAsClientAsync("127.0.0.1", clientCertificates: null,
enabledSslProtocols: SslProtocols.Tls,
checkCertificateRevocation: false));
}
}

await loggerProvider.FilterLogger.LogTcs.Task.DefaultTimeout();
Assert.Equal(3, loggerProvider.FilterLogger.LastEventId);
Assert.Equal(LogLevel.Error, loggerProvider.FilterLogger.LastLogLevel);
}

[Fact]
public async Task OnAuthenticate_SeesOtherSettings()
{
Expand Down