From b4a7ecacc8ecf8f4118af2303936e658c445320e Mon Sep 17 00:00:00 2001 From: Matt Richardson Date: Mon, 10 Feb 2020 12:10:34 +1100 Subject: [PATCH] Updates to get linux tentacle e2e tests working on linux (#189) * Setup target frameworks for linux development * Update shared to get watchdog default value (https://github.com/OctopusDeploy/OctopusShared/pull/96) * Decrease logging level to make tests less flaky * Default ApplicationPath properly on linux --- .../Octopus.Tentacle.Tests.csproj | 8 +++++++- .../Configuration/TentacleConfiguration.cs | 14 ++++++++++++-- source/Octopus.Tentacle/Octopus.Tentacle.csproj | 9 +++++++-- source/Octopus.Tentacle/Tentacle.exe.nlog | 2 +- 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/source/Octopus.Tentacle.Tests/Octopus.Tentacle.Tests.csproj b/source/Octopus.Tentacle.Tests/Octopus.Tentacle.Tests.csproj index fbf277f62..eb0d4ce32 100644 --- a/source/Octopus.Tentacle.Tests/Octopus.Tentacle.Tests.csproj +++ b/source/Octopus.Tentacle.Tests/Octopus.Tentacle.Tests.csproj @@ -2,12 +2,18 @@ Octopus.Tentacle.Tests Octopus.Tentacle.Tests - net452;netcoreapp2.2 true false true + + net452;netcoreapp2.2 + + + netcoreapp2.2 + + $(DefineConstants);DEFAULT_PROXY_IS_AVAILABLE diff --git a/source/Octopus.Tentacle/Configuration/TentacleConfiguration.cs b/source/Octopus.Tentacle/Configuration/TentacleConfiguration.cs index 98dba9d40..cf87a6541 100644 --- a/source/Octopus.Tentacle/Configuration/TentacleConfiguration.cs +++ b/source/Octopus.Tentacle/Configuration/TentacleConfiguration.cs @@ -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 { @@ -82,8 +83,17 @@ public string ApplicationDirectory var path = settings.Get("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; diff --git a/source/Octopus.Tentacle/Octopus.Tentacle.csproj b/source/Octopus.Tentacle/Octopus.Tentacle.csproj index 78224611e..b6977c25c 100644 --- a/source/Octopus.Tentacle/Octopus.Tentacle.csproj +++ b/source/Octopus.Tentacle/Octopus.Tentacle.csproj @@ -3,7 +3,6 @@ Octopus.Tentacle Tentacle true - net452;netcoreapp2.2 win-x64;linux-x64;osx-x64 false Exe @@ -11,6 +10,12 @@ bin\ Tentacle.exe.manifest + + net452;netcoreapp2.2 + + + netcoreapp2.2 + True @@ -23,7 +28,7 @@ - + diff --git a/source/Octopus.Tentacle/Tentacle.exe.nlog b/source/Octopus.Tentacle/Tentacle.exe.nlog index 02ced7c7f..aef32e789 100644 --- a/source/Octopus.Tentacle/Tentacle.exe.nlog +++ b/source/Octopus.Tentacle/Tentacle.exe.nlog @@ -4,7 +4,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true" throwExceptions="false" - internalLogLevel="Warn" + internalLogLevel="Fatal" internalLogToConsole="true">