Skip to content

Commit 2f0ae31

Browse files
Bump test dependencies (#1693)
* Bump actions/checkout from 4 to 5 * Bump actions/upload-pages-artifact from 3 to 4 * Bump actions/download-artifact from 4 to 5 * Bump the dependencies group with 5 updates * fix * fix locally failing portforwarding tests port already in use --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Rob Hague <rob.hague00@gmail.com>
1 parent b199467 commit 2f0ae31

File tree

4 files changed

+18
-22
lines changed

4 files changed

+18
-22
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-24.04
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v4
13+
uses: actions/checkout@v5
1414
with:
1515
fetch-depth: 0 # needed for Nerdbank.GitVersioning
1616

@@ -57,7 +57,7 @@ jobs:
5757
runs-on: windows-2025
5858
steps:
5959
- name: Checkout
60-
uses: actions/checkout@v4
60+
uses: actions/checkout@v5
6161
with:
6262
fetch-depth: 0 # needed for Nerdbank.GitVersioning
6363

@@ -108,7 +108,7 @@ jobs:
108108
runs-on: windows-2025
109109
steps:
110110
- name: Checkout
111-
uses: actions/checkout@v4
111+
uses: actions/checkout@v5
112112
with:
113113
fetch-depth: 0 # needed for Nerdbank.GitVersioning
114114

@@ -155,7 +155,7 @@ jobs:
155155
- Linux
156156
steps:
157157
- name: Download NuGet Package
158-
uses: actions/download-artifact@v4
158+
uses: actions/download-artifact@v5
159159
with:
160160
name: NuGet Package
161161

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- name: Checkout repository
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v5
2626

2727
- name: Setup Pages
2828
uses: actions/configure-pages@v5
@@ -37,7 +37,7 @@ jobs:
3737
run: docfx ./docfx/docfx.json
3838

3939
- name: Upload documentation
40-
uses: actions/upload-pages-artifact@v3
40+
uses: actions/upload-pages-artifact@v4
4141
with:
4242
path: './docfx/_site'
4343

Directory.Packages.props

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@
44
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
55
</PropertyGroup>
66
<ItemGroup>
7-
<PackageVersion Include="BenchmarkDotNet" Version="0.15.2" />
7+
<PackageVersion Include="BenchmarkDotNet" Version="0.15.3" />
88
<PackageVersion Include="BouncyCastle.Cryptography" Version="2.6.2" />
99
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
1010
<PackageVersion Include="coverlet.msbuild" Version="6.0.4" />
1111
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" />
12-
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.210" />
12+
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.220" />
1313
<!-- Should stay on LTS .NET releases. -->
1414
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.3" />
15-
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="9.0.7" />
16-
<PackageVersion Include="MSTest" Version="3.10.0" />
15+
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="9.0.9" />
16+
<PackageVersion Include="MSTest" Version="3.9.3" />
1717
<PackageVersion Include="Moq" Version="4.20.72" />
1818
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.7.115" />
1919
<PackageVersion Include="PolySharp" Version="1.15.0" />
2020
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.15.0.120848" />
2121
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
2222
<!-- Should stay on LTS .NET releases. -->
2323
<PackageVersion Include="System.Formats.Asn1" Version="8.0.2" />
24-
<PackageVersion Include="Testcontainers" Version="4.6.0" />
24+
<PackageVersion Include="Testcontainers" Version="4.7.0" />
2525
</ItemGroup>
26-
</Project>
26+
</Project>

test/Renci.SshNet.IntegrationTests/SshTests.cs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -527,12 +527,9 @@ public void Ssh_LocalPortForwardingCloseChannels()
527527
{
528528
client.Connect();
529529

530-
var localEndPoint = new IPEndPoint(IPAddress.Loopback, 1225);
531-
532530
for (var i = 0; i < (connectionInfo.MaxSessions + 1); i++)
533531
{
534-
var forwardedPort = new ForwardedPortLocal(localEndPoint.Address.ToString(),
535-
(uint)localEndPoint.Port,
532+
var forwardedPort = new ForwardedPortLocal(IPAddress.Loopback.ToString(),
536533
hostNameAlias,
537534
80);
538535
client.AddForwardedPort(forwardedPort);
@@ -547,7 +544,8 @@ public void Ssh_LocalPortForwardingCloseChannels()
547544

548545
using HttpClient httpClient = new(handler);
549546

550-
using HttpResponseMessage httpResponse = httpClient.GetAsync("http://" + localEndPoint).Result;
547+
using HttpResponseMessage httpResponse = httpClient.GetAsync(
548+
$"http://{forwardedPort.BoundHost}:{forwardedPort.BoundPort}").Result;
551549

552550
Assert.AreEqual(HttpStatusCode.MovedPermanently, httpResponse.StatusCode);
553551
}
@@ -583,10 +581,7 @@ public void Ssh_LocalPortForwarding()
583581
{
584582
client.Connect();
585583

586-
var localEndPoint = new IPEndPoint(IPAddress.Loopback, 1225);
587-
588-
var forwardedPort = new ForwardedPortLocal(localEndPoint.Address.ToString(),
589-
(uint)localEndPoint.Port,
584+
var forwardedPort = new ForwardedPortLocal(IPAddress.Loopback.ToString(),
590585
hostNameAlias,
591586
80);
592587
forwardedPort.Exception +=
@@ -603,7 +598,8 @@ public void Ssh_LocalPortForwarding()
603598

604599
using HttpClient httpClient = new(handler);
605600

606-
using HttpResponseMessage httpResponse = httpClient.GetAsync("http://" + localEndPoint).Result;
601+
using HttpResponseMessage httpResponse = httpClient.GetAsync(
602+
$"http://{forwardedPort.BoundHost}:{forwardedPort.BoundPort}").Result;
607603

608604
Assert.AreEqual(HttpStatusCode.MovedPermanently, httpResponse.StatusCode);
609605
}

0 commit comments

Comments
 (0)