File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
AzureWebFarm.OctopusDeploy.Tests
AzureWebFarm.OctopusDeploy/Infrastructure Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ public class AzureEnvironmentTests
1212 [ Fact ]
1313 public void GivenSuffixIsEmpty_WhenGeneratingFarmName_ThenUseMachineNameAndEnvironment ( )
1414 {
15+ AzureRoleEnvironment . IsAvailable = ( ) => false ;
16+ AzureRoleEnvironment . IsEmulated = ( ) => false ;
1517 var machineName = Environment . MachineName ;
1618 _config . TentacleMachineNameSuffix = "" ;
1719 _config . TentacleEnvironment = "Production" ;
@@ -24,6 +26,8 @@ public void GivenSuffixIsEmpty_WhenGeneratingFarmName_ThenUseMachineNameAndEnvir
2426 [ Fact ]
2527 public void GivenSuffixIsNotEmpty_WhenGeneratingFarmName_ThenUseMachineNameAndEnvironmentAndSuffix ( )
2628 {
29+ AzureRoleEnvironment . IsAvailable = ( ) => false ;
30+ AzureRoleEnvironment . IsEmulated = ( ) => false ;
2731 var machineName = Environment . MachineName ;
2832 _config . TentacleMachineNameSuffix = "Suffix" ;
2933 _config . TentacleEnvironment = "Production" ;
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<configuration >
3- <startup useLegacyV2RuntimeActivationPolicy =" true" >
4- <supportedRuntime version =" v4.0" sku =" .NETFramework,Version=v4.5" />
5- </startup >
63 <runtime >
74 <assemblyBinding xmlns =" urn:schemas-microsoft-com:asm.v1" >
85 <dependentAssembly >
Original file line number Diff line number Diff line change @@ -7,6 +7,6 @@ internal static class AzureRoleEnvironment
77 {
88 public static Func < bool > IsAvailable = ( ) => RoleEnvironment . IsAvailable ;
99 public static Func < string > CurrentRoleInstanceId = ( ) => IsAvailable ( ) ? RoleEnvironment . CurrentRoleInstance . Id : Environment . MachineName ;
10- public static Func < bool > IsEmulated = ( ) => IsAvailable ( ) && RoleEnvironment . IsEmulated ;
10+ public static Func < bool > IsEmulated = ( ) => RoleEnvironment . IsEmulated ;
1111 }
1212}
You can’t perform that action at this time.
0 commit comments