Skip to content

Commit b084e12

Browse files
borlandOctobob
authored andcommitted
Update dev-time dependencies used in builds and tests only
skip-release-and-release-note: true GitOrigin-RevId: 9fb54b5a80767c2a669a38108f44bbf78ff7cb6c
1 parent 429e991 commit b084e12

File tree

4 files changed

+31
-22
lines changed

4 files changed

+31
-22
lines changed

.github/workflows/main.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959

6060
# Unit test reports
6161
- name: Windows .NET 4.6.2 unit test report
62-
uses: dorny/test-reporter@6e6a65b7a0bd2c9197df7d0ae36ac5cee784230c # v2.0.0
62+
uses: dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3 # v2.1.1
6363
if: success() || failure() # run this step even if previous step failed
6464
with:
6565
name: Windows .Net 4.6.2 unit test results
@@ -68,7 +68,7 @@ jobs:
6868
fail-on-error: true
6969

7070
- name: Windows .NET 4.8 unit test report
71-
uses: dorny/test-reporter@6e6a65b7a0bd2c9197df7d0ae36ac5cee784230c # v2.0.0
71+
uses: dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3 # v2.1.1
7272
if: success() || failure() # run this step even if previous step failed
7373
with:
7474
name: Windows.Net 4.8 unit test results
@@ -77,7 +77,7 @@ jobs:
7777
fail-on-error: true
7878

7979
- name: Windows .NET 8.0 unit test report
80-
uses: dorny/test-reporter@6e6a65b7a0bd2c9197df7d0ae36ac5cee784230c # v2.0.0
80+
uses: dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3 # v2.1.1
8181
if: success() || failure() # run this step even if previous step failed
8282
with:
8383
name: Windows .Net 8.0 unit test results
@@ -88,7 +88,7 @@ jobs:
8888
# E2E test reports
8989

9090
- name: Windows .NET 4.6.2 E2E test report
91-
uses: dorny/test-reporter@6e6a65b7a0bd2c9197df7d0ae36ac5cee784230c # v2.0.0
91+
uses: dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3 # v2.1.1
9292
if: success() || failure() # run this step even if previous step failed
9393
with:
9494
name: Windows .NET 4.6.2 E2E test results
@@ -97,7 +97,7 @@ jobs:
9797
fail-on-error: true
9898

9999
- name: Windows .NET 4.8 E2E test report
100-
uses: dorny/test-reporter@6e6a65b7a0bd2c9197df7d0ae36ac5cee784230c # v2.0.0
100+
uses: dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3 # v2.1.1
101101
if: success() || failure() # run this step even if previous step failed
102102
with:
103103
name: Windows .NET 4.8 E2E test results
@@ -106,7 +106,7 @@ jobs:
106106
fail-on-error: true
107107

108108
- name: Windows .NET 8.0 E2E test report
109-
uses: dorny/test-reporter@6e6a65b7a0bd2c9197df7d0ae36ac5cee784230c # v2.0.0
109+
uses: dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3 # v2.1.1
110110
if: success() || failure() # run this step even if previous step failed
111111
with:
112112
name: Windows .NET 8.0 E2E test results
@@ -159,7 +159,7 @@ jobs:
159159
run: dotnet test ./source/Octopus.Client.Tests/Octopus.Client.Tests.csproj --framework net8.0 --configuration:Release --logger:"trx;LogFilePrefix=Linux" --results-directory ./TestResults
160160

161161
- name: Linux unit test report
162-
uses: dorny/test-reporter@6e6a65b7a0bd2c9197df7d0ae36ac5cee784230c # v2.0.0
162+
uses: dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3 # v2.1.1
163163
if: success() || failure() # run this step even if previous step failed
164164
with:
165165
name: Linux unit tests results

source/Octopus.Client.E2ETests/Octopus.Client.E2ETests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
<ItemGroup>
2525
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
2626
<PackageReference Include="NSubstitute" Version="5.3.0" />
27-
<PackageReference Include="NUnit" Version="4.2.2" />
28-
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" NoWarn="NU1701" /> <!-- This package only targets legacy .NET desktop, but it still works on netcore so we force past the warning -->
27+
<PackageReference Include="NUnit" Version="4.4.0" />
28+
<PackageReference Include="NUnit3TestAdapter" Version="5.1.0" NoWarn="NU1701" /> <!-- This package only targets legacy .NET desktop, but it still works on netcore so we force past the warning -->
2929
<PackageReference Include="TeamCity.VSTest.TestAdapter" Version="1.0.41" NoWarn="NU1701" /> <!-- This package only targets legacy .NET desktop, but it still works on netcore so we force past the warning -->
3030
<PackageReference Include="FluentAssertions" Version="6.12.2" />
3131
</ItemGroup>

source/Octopus.Client.Tests/Integration/OctopusClient/UserAgentTests.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,23 @@ protected override void CleanupEnvironmentVariables()
5757
[Test]
5858
public async Task AsyncClient_ShouldProvideUserAgent_WithNameAndVersion()
5959
{
60+
// Note: This test can fail when running locally with a mismatched git sha on the end of the version.
61+
// A typical user agent looks like this:
62+
// OctopusClient-dotnet/1.0.0+8bc1b4a8856ac42a899919d3cbe29852d879132c (TestOS; x64) NoneOrUnknown
63+
// Because it is based on the assembly InformationalVersion, which microsoft started adding git sha's to around .NET 7
64+
// with a feature called SourceLink.
65+
//
66+
// If you run the tests locally, it is easy to end up with a version of Octopus.Client.dll (system under test) which was built
67+
// from an earlier commit, whereas the Test assembly is likely to be built with whatever HEAD is at the time.
68+
// If this happens, simply rebuild the projects in the `Clients` solution folder and the problem should go away
6069
var response = await AsyncClient.Get<TestDto>(TestRootPath);
6170
response.UserAgentValue.Should().Be($"{ApiConstants.OctopusUserAgentProductName}/{GetType().GetSemanticVersion().ToNormalizedString()} (TestOS; x64) NoneOrUnknown", "We should set the standard User-Agent header");
6271
}
6372

6473
[Test]
6574
public void SyncClient_ShouldProvideUserAgent_WithNameAndVersion()
6675
{
76+
// As above can fail with mismatched git sha in version; rebuild folder if you need to
6777
var client = new Client.OctopusClient(new OctopusServerEndpoint(HostBaseUri + TestRootPath));
6878
var response = client.Get<TestDto>(TestRootPath);
6979
response.UserAgentValue.Should().Be($"{ApiConstants.OctopusUserAgentProductName}/{GetType().GetSemanticVersion().ToNormalizedString()} (TestOS; x64) NoneOrUnknown", "We should set the standard User-Agent header");
@@ -74,4 +84,4 @@ public class TestDto
7484
public string UserAgentValue { get; set; }
7585
}
7686
}
77-
}
87+
}

source/Octopus.Client.Tests/Octopus.Client.Tests.csproj

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,20 @@
3535
</ItemGroup>
3636

3737
<ItemGroup>
38-
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.2.12-alpha">
39-
<PrivateAssets>all</PrivateAssets>
40-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
41-
</PackageReference>
4238
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
43-
<PackageReference Include="NUnit" Version="4.2.2" />
44-
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" NoWarn="NU1701" /> <!-- This package only targets legacy .NET desktop, but it still works on netcore so we force past the warning -->
39+
<PackageReference Include="NUnit" Version="4.4.0" />
40+
<PackageReference Include="NUnit3TestAdapter" Version="5.1.0" NoWarn="NU1701" /> <!-- This package only targets legacy .NET desktop, but it still works on netcore so we force past the warning -->
4541
<PackageReference Include="TeamCity.VSTest.TestAdapter" Version="1.0.41" NoWarn="NU1701" /> <!-- This package only targets legacy .NET desktop, but it still works on netcore so we force past the warning -->
46-
<PackageReference Include="Assent" Version="1.9.3" />
4742
<PackageReference Include="Autofac" Version="8.4.0" />
4843
<PackageReference Include="FluentAssertions" Version="6.12.2" />
4944
<PackageReference Include="Nancy" Version="2.0.0" />
5045
<PackageReference Include="NSubstitute" Version="5.3.0" />
5146
<PackageReference Include="Serilog" Version="4.3.0" />
52-
<PackageReference Include="Microsoft.AspNetCore.Owin" Version="2.1.1" />
53-
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.1.3" />
54-
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Https" Version="2.1.3" />
55-
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.1.1" />
56-
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="9.0.0" />
47+
<PackageReference Include="Microsoft.AspNetCore.Owin" Version="2.3.0" />
48+
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.3.0" />
49+
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Https" Version="2.3.0" />
50+
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.8" />
51+
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="9.0.8" />
5752
<PackageReference Include="Best.Conventional" Version="12.0.0" />
5853
</ItemGroup>
5954

@@ -62,6 +57,10 @@
6257
<Reference Include="System.ComponentModel.DataAnnotations" />
6358
<Reference Include="Microsoft.CSharp" />
6459
<Reference Include="System.Net.Http" />
60+
<PackageReference Include="Assent" Version="1.9.3" />
61+
</ItemGroup>
62+
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
63+
<PackageReference Include="Assent" Version="2.4.2" />
6564
</ItemGroup>
6665

6766
<ItemGroup>

0 commit comments

Comments
 (0)