Skip to content

Commit

Permalink
Updates to get linux tentacle e2e tests working on linux (#189)
Browse files Browse the repository at this point in the history
* Setup target frameworks for linux development
* Update shared to get watchdog default value (OctopusDeploy/OctopusShared#96)
* Decrease logging level to make tests less flaky
* Default ApplicationPath properly on linux
  • Loading branch information
matt-richardson authored Feb 10, 2020
1 parent 57e3d6d commit b4a7eca
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
8 changes: 7 additions & 1 deletion source/Octopus.Tentacle.Tests/Octopus.Tentacle.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
<PropertyGroup>
<RootNamespace>Octopus.Tentacle.Tests</RootNamespace>
<AssemblyName>Octopus.Tentacle.Tests</AssemblyName>
<TargetFrameworks>net452;netcoreapp2.2</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>

<PropertyGroup Condition="!$([MSBuild]::IsOSUnixLike())">
<TargetFrameworks>net452;netcoreapp2.2</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSUnixLike())">
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net452' ">
<DefineConstants>$(DefineConstants);DEFAULT_PROXY_IS_AVAILABLE</DefineConstants>
</PropertyGroup>
Expand Down
14 changes: 12 additions & 2 deletions source/Octopus.Tentacle/Configuration/TentacleConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Octopus.Shared.Configuration;
using Octopus.Shared.Security;
using Octopus.Shared.Security.Certificates;
using Octopus.Shared.Util;

namespace Octopus.Tentacle.Configuration
{
Expand Down Expand Up @@ -82,8 +83,17 @@ public string ApplicationDirectory
var path = settings.Get<string>("Tentacle.Deployment.ApplicationDirectory");
if (string.IsNullOrWhiteSpace(path))
{
var programFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
path = Path.Combine(Path.GetPathRoot(programFiles), "Octopus\\Applications");
if (PlatformDetection.IsRunningOnWindows)
{
var programFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
path = Path.Combine(Path.GetPathRoot(programFiles), "Octopus\\Applications");
}
else
{
//this feels wrong... but it's what we're defaulting to with the install scripts
//see https://github.com/OctopusDeploy/OctopusTentacle/blob/d3a0fca5bb67c49b5f594077ff2b3da8ba377ad3/scripts/configure-tentacle.sh#L47
path = "/home/Octopus/Applications";
}
}

return path;
Expand Down
9 changes: 7 additions & 2 deletions source/Octopus.Tentacle/Octopus.Tentacle.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@
<RootNamespace>Octopus.Tentacle</RootNamespace>
<AssemblyName>Tentacle</AssemblyName>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<TargetFrameworks>net452;netcoreapp2.2</TargetFrameworks>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputType>Exe</OutputType>
<NoWin32Manifest>true</NoWin32Manifest>
<OutputPath>bin\</OutputPath>
<ApplicationManifest>Tentacle.exe.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup Condition="!$([MSBuild]::IsOSUnixLike())">
<TargetFrameworks>net452;netcoreapp2.2</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSUnixLike())">
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<Optimize>True</Optimize>
Expand All @@ -23,7 +28,7 @@
</PackageReference>
<PackageReference Include="Octopus.Configuration" Version="2.0.1" />
<PackageReference Include="Octopus.Client" Version="7.1.1" />
<PackageReference Include="Octopus.Shared" Version="4.13.12" />
<PackageReference Include="Octopus.Shared" Version="5.0.5" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion source/Octopus.Tentacle/Tentacle.exe.nlog
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
autoReload="true"
throwExceptions="false"
internalLogLevel="Warn"
internalLogLevel="Fatal"
internalLogToConsole="true">

<extensions>
Expand Down

0 comments on commit b4a7eca

Please sign in to comment.