@@ -587,7 +587,7 @@ public async Task EndToEnd_NoAPI_ProjectType(string projectType, bool addPackage
587
587
CommandResult commandResult = new DotnetCommand (
588
588
_testOutput ,
589
589
"publish" ,
590
- "/p:PublishProfile=DefaultContainer " ,
590
+ "/t:PublishContainer " ,
591
591
"/p:RuntimeIdentifier=linux-x64" ,
592
592
$ "/p:ContainerBaseImage={ DockerRegistryManager . FullyQualifiedBaseImageAspNet } ",
593
593
$ "/p:ContainerRegistry={ DockerRegistryManager . LocalRegistry } ",
@@ -616,12 +616,14 @@ public async Task EndToEnd_NoAPI_ProjectType(string projectType, bool addPackage
616
616
var containerName = $ "test-container-1-{ projectType } -{ addPackageReference } ";
617
617
CommandResult processResult = ContainerCli . RunCommand (
618
618
_testOutput ,
619
- "--rm" ,
620
- "--name" ,
621
- containerName ,
622
- "-P" ,
623
- "--detach" ,
624
- $ "{ DockerRegistryManager . LocalRegistry } /{ imageName } :{ imageTag } ")
619
+ [
620
+ "--rm" ,
621
+ "--name" ,
622
+ containerName ,
623
+ "-P" ,
624
+ ..projectType != "console" ? [ "--detach" ] : new string [ ] { } ,
625
+ $ "{ DockerRegistryManager . LocalRegistry } /{ imageName } :{ imageTag } "
626
+ ] )
625
627
. Execute ( ) ;
626
628
processResult . Should ( ) . Pass ( ) ;
627
629
Assert . NotNull ( processResult . StdOut ) ;
@@ -665,14 +667,13 @@ public async Task EndToEnd_NoAPI_ProjectType(string projectType, bool addPackage
665
667
Assert . True ( everSucceeded , $ "{ appUri } weatherforecast never responded.") ;
666
668
667
669
ContainerCli . StopCommand ( _testOutput , appContainerId )
668
- . Execute ( )
669
- . Should ( ) . Pass ( ) ;
670
+ . Execute ( )
671
+ . Should ( ) . Pass ( ) ;
670
672
}
671
673
else if ( projectType == "worker" )
672
674
{
673
675
// the worker template needs a second to start up and emit the logs we are looking for
674
676
await Task . Delay ( TimeSpan . FromSeconds ( 5 ) ) . ConfigureAwait ( false ) ;
675
- var containerLogs =
676
677
ContainerCli . LogsCommand ( _testOutput , appContainerId )
677
678
. Execute ( )
678
679
. Should ( ) . Pass ( )
@@ -681,10 +682,11 @@ public async Task EndToEnd_NoAPI_ProjectType(string projectType, bool addPackage
681
682
ContainerCli . StopCommand ( _testOutput , appContainerId )
682
683
. Execute ( )
683
684
. Should ( ) . Pass ( ) ;
685
+
684
686
}
685
- else
687
+ else if ( projectType == "console" )
686
688
{
687
- throw new NotImplementedException ( "Unknown project type ") ;
689
+ processResult . Should ( ) . Pass ( ) . And . HaveStdOutContaining ( "Hello, World! ") ;
688
690
}
689
691
690
692
newProjectDir . Delete ( true ) ;
0 commit comments