Adding some coverage for the --no-source switch

This commit is contained in:
Praburaj 2015-03-17 12:46:02 -07:00
parent 1b502cbee7
commit 6dc2417f9e
6 changed files with 28 additions and 19 deletions

View File

@ -15,6 +15,5 @@ namespace MusicStore
// Plug in your sms service
return Task.FromResult(0);
}
}
}

View File

@ -1,6 +1,4 @@
using System;
namespace MusicStore.ViewModels
namespace MusicStore.ViewModels
{
public class AlbumData
{

View File

@ -7,13 +7,13 @@
"compilationOptions": { "warningsAsErrors": true, "define": [ "DEMO", "TESTING" ] },
"code": [
"**/*.cs",
"../../test/E2ETests/compiler/shared/**/*.cs" // This code is for testing only.
"../../test/E2ETests/compiler/shared/**/*.cs" // This code is for testing only.
],
"bundleExclude": "*.cmd",
"webroot": "wwwroot",
"dependencies": {
"EntityFramework.SqlServer": "7.0.0-*",
"EntityFramework.InMemory": "7.0.0-*", // For Mono.
"EntityFramework.InMemory": "7.0.0-*", // For Mono.
"Kestrel": "1.0.0-*",
"Microsoft.AspNet.Authentication.Cookies": "1.0.0-*",
"Microsoft.AspNet.Authentication.Facebook": "1.0.0-*",
@ -30,7 +30,7 @@
"Microsoft.AspNet.Session": "1.0.0-*",
"Microsoft.AspNet.SignalR.Server": "3.0.0-*",
"Microsoft.AspNet.StaticFiles": "1.0.0-*",
"Microsoft.Framework.Caching.Distributed": "1.0.0-*", // For Session.
"Microsoft.Framework.Caching.Distributed": "1.0.0-*", // For Session.
"Microsoft.Framework.CodeGenerators.Mvc": "1.0.0-*",
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-*",
"Microsoft.Framework.Logging.Console": "1.0.0-*"

View File

@ -337,7 +337,14 @@ namespace E2ETests
{
startParameters.BundledApplicationRootPath = Path.Combine(bundleRoot ?? Path.GetTempPath(), Guid.NewGuid().ToString());
var parameters = string.Format("bundle {0} -o {1} --runtime {2}", startParameters.ApplicationPath, startParameters.BundledApplicationRootPath, startParameters.Runtime);
var parameters =
string.Format(
"bundle {0} -o {1} --runtime {2} {3}",
startParameters.ApplicationPath,
startParameters.BundledApplicationRootPath,
startParameters.Runtime,
startParameters.BundleWithNoSource ? "--no-source" : string.Empty);
logger.LogInformation("Executing command kpm {args}", parameters);
var startInfo = new ProcessStartInfo

View File

@ -25,6 +25,8 @@
public string BundledApplicationRootPath { get; set; }
public bool BundleWithNoSource { get; set; }
public string Runtime { get; set; }
#if DNX451

View File

@ -12,31 +12,33 @@ namespace E2ETests
{
[ConditionalTheory]
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
[InlineData(ServerType.IISExpress, RuntimeFlavor.DesktopClr, RuntimeArchitecture.x86, "http://localhost:5001/")]
public void Publish_And_Run_Tests_On_X86(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl)
[InlineData(ServerType.IISExpress, RuntimeFlavor.DesktopClr, RuntimeArchitecture.x86, "http://localhost:5001/", false)]
[InlineData(ServerType.IISExpress, RuntimeFlavor.DesktopClr, RuntimeArchitecture.x86, "http://localhost:5001/", true)]
public void Publish_And_Run_Tests_On_X86(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, bool noSource)
{
Publish_And_Run_Tests(serverType, runtimeFlavor, architecture, applicationBaseUrl);
Publish_And_Run_Tests(serverType, runtimeFlavor, architecture, applicationBaseUrl, noSource);
}
[ConditionalTheory]
[FrameworkSkipCondition(RuntimeFrameworks.DotNet)]
[InlineData(ServerType.Kestrel, RuntimeFlavor.Mono, RuntimeArchitecture.x86, "http://localhost:5004/")]
public void Publish_And_Run_Tests_On_Mono(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl)
[InlineData(ServerType.Kestrel, RuntimeFlavor.Mono, RuntimeArchitecture.x86, "http://localhost:5004/", false)]
[InlineData(ServerType.Kestrel, RuntimeFlavor.Mono, RuntimeArchitecture.x86, "http://localhost:5004/", true)]
public void Publish_And_Run_Tests_On_Mono(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, bool noSource)
{
Publish_And_Run_Tests(serverType, runtimeFlavor, architecture, applicationBaseUrl);
Publish_And_Run_Tests(serverType, runtimeFlavor, architecture, applicationBaseUrl, noSource);
}
[ConditionalTheory]
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
[InlineData(ServerType.WebListener, RuntimeFlavor.DesktopClr, RuntimeArchitecture.amd64, "http://localhost:5002/")]
[InlineData(ServerType.WebListener, RuntimeFlavor.DesktopClr, RuntimeArchitecture.amd64, "http://localhost:5002/", false)]
//https://github.com/aspnet/KRuntime/issues/642
//[InlineData(ServerType.Helios, RuntimeFlavor.CoreClr, RuntimeArchitecture.amd64, "http://localhost:5001/")]
public void Publish_And_Run_Tests_On_AMD64(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl)
public void Publish_And_Run_Tests_On_AMD64(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, bool noSource)
{
Publish_And_Run_Tests(serverType, runtimeFlavor, architecture, applicationBaseUrl);
Publish_And_Run_Tests(serverType, runtimeFlavor, architecture, applicationBaseUrl, noSource);
}
private void Publish_And_Run_Tests(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl)
private void Publish_And_Run_Tests(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, bool noSource)
{
using (_logger.BeginScope("Publish_And_Run_Tests"))
{
@ -48,7 +50,8 @@ namespace E2ETests
ServerType = serverType,
RuntimeFlavor = runtimeFlavor,
RuntimeArchitecture = architecture,
BundleApplicationBeforeStart = true
BundleApplicationBeforeStart = true,
BundleWithNoSource = noSource
};
var stopwatch = Stopwatch.StartNew();