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 // Plug in your sms service
return Task.FromResult(0); return Task.FromResult(0);
} }
} }
} }

View File

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

View File

@ -337,7 +337,14 @@ namespace E2ETests
{ {
startParameters.BundledApplicationRootPath = Path.Combine(bundleRoot ?? Path.GetTempPath(), Guid.NewGuid().ToString()); 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); logger.LogInformation("Executing command kpm {args}", parameters);
var startInfo = new ProcessStartInfo var startInfo = new ProcessStartInfo

View File

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

View File

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