Add convention test capability to Calamari - #791
Conversation
| [Test] | ||
| [RequiresMonoVersion480OrAboveForTls12] | ||
| [RequiresMinimumMonoVersion(5, 12, 0, Description = "HttpClient 4.3.2 broken on Mono - https://xamarin.github.io/bugzilla-archives/60/60315/bug.html#c7")] | ||
| public void ShouldDownloadPackageWithRepositoryMetadata() |
There was a problem hiding this comment.
This test now requires Mono >= 5.12.0
| [NonParallelizable] | ||
| [RequiresNonFreeBSDPlatform(SkipFreeBsdBecause)] | ||
| [RequiresMinimumMonoVersion(5, 12, 0, Description = "HttpClient 4.3.2 broken on Mono - https://xamarin.github.io/bugzilla-archives/60/60315/bug.html#c7")] | ||
| public void DoesNotTimeOutIfTheServerRespondsBeforeTheTimeout() |
There was a problem hiding this comment.
This test now requires Mono >= 5.12.0
| [NonParallelizable] | ||
| [RequiresNonFreeBSDPlatform(SkipFreeBsdBecause)] | ||
| [RequiresMinimumMonoVersion(5, 12, 0, Description = "HttpClient 4.3.2 broken on Mono - https://xamarin.github.io/bugzilla-archives/60/60315/bug.html#c7")] | ||
| public void IgnoresTheTimeoutIfAnInvalidTimeoutIsDefinedInVariables() |
There was a problem hiding this comment.
This test now requires Mono >= 5.12.0
| [NonParallelizable] | ||
| [RequiresNonFreeBSDPlatform(SkipFreeBsdBecause)] | ||
| [RequiresMinimumMonoVersion(5, 12, 0, Description = "HttpClient 4.3.2 broken on Mono - https://xamarin.github.io/bugzilla-archives/60/60315/bug.html#c7")] | ||
| public void TimesOutIfAValidTimeoutIsDefinedInVariables() |
There was a problem hiding this comment.
This test now requires Mono >= 5.12.0
| @@ -0,0 +1,6 @@ | |||
| { | |||
There was a problem hiding this comment.
Do we need this for this PR?
There was a problem hiding this comment.
Hmm we did need this when jumping to net480 since the 3.1 SDK wasn't compatible with building the tests. But for net461 I'm not certain. I can check when I split the PR up.
There was a problem hiding this comment.
Update: The tests built fine without this change on net461, so looks like no it's not needed.
| using NUnit.Framework; | ||
|
|
||
| namespace Calamari.Tests.Fixtures.Conventions | ||
| namespace Calamari.Tests.Fixtures.Deployment.Conventions |
There was a problem hiding this comment.
This namespace shuffle has added quite a lot of churn / noise to the PR. Perhaps we could separate this into two PRs: one that introduces the framework changes, and another that then does the "tidy up" of namespace reshuffling? It will make them easier to understand later on if people need to return to them.
There was a problem hiding this comment.
That sounds good to me
andrewabest
left a comment
There was a problem hiding this comment.
I've made a suggestion to reorganise this work into two PRs so that they are a bit smaller / more focussed. When that is done I think they will both be good to go :)
|
The changes have been split into the above PRs ☝️ |
As part of the package retention changes #team-fire-and-motion are making, we want to add convention test(s) to Calamari. For this we're taking a similar approach to OctopusServer, which uses
Best.Conventional. However the currentCalamari.Testsproject isn't compatible as it's runningnet452. This PR updatesCalamari.Teststonet461along with moving the currentFixtures/Conventionstests intoFixtures/Deployment/Conventions. This is done because:Calamariproject which also hasFixtures/Deployment/ConventionsFixtures/Conventionswhich aligns with OctopusServer's structureHow to review
The main change in this PR is in
Calamari.Tests.csproj. All.csfiles should just be namespace changes with the exception of test fixtures which have been excluded from running on Mono <5.12.0 due to HttpClient issues (I've commented these on the PR to make them easier to find amongst the mass of namespace changes).This PR also adds a
global.jsonfile which is required to build the solution on our TeamCity agents using .NET SDK 5 instead of .NET SDK 3.1 which leads to incompatibility issues withnet461.To go along with this PR we have a docs change to update our earliest recommended version of Mono OctopusDeploy/docs#1390