Skip VSTS attribute (#1115)

This commit is contained in:
Pavel Krymets 2018-07-30 08:27:06 -07:00 committed by GitHub
parent 41493f01e3
commit 7d641f8796
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 0 deletions

View File

@ -3,6 +3,8 @@ phases:
parameters:
agentOs: Windows
beforeBuild:
- powershell: "git submodule update --init"
displayName: Update submodules
- powershell: "& ./tools/update_schema.ps1"
displayName: Update ANCM schema
- powershell: Restart-Service w3svc

View File

@ -0,0 +1,17 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNetCore.Server.IntegrationTesting;
using Microsoft.AspNetCore.Testing.xunit;
namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
{
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)]
public sealed class SkipInVSTSAttribute : Attribute, ITestCondition
{
public bool IsMet => string.IsNullOrEmpty(Environment.GetEnvironmentVariable("SYSTEM_TASKDEFINITIONSURI"));
public string SkipReason => "Running in VSTS";
}
}

View File

@ -18,6 +18,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
// So these tests always have to use ports in this range, and we can't rely on OS-allocated ports without a whole lot of ceremony around
// creating self-signed certificates and registering SSL bindings with HTTP.sys
// Test specific to IISExpress
[SkipInVSTS]
public class HttpsTest : IISFunctionalTestBase
{
public HttpsTest(ITestOutputHelper output) : base(output)