Skip to content

Commit 0f7622e

Browse files
committed
Add NuGet test project for validating deployment package
- Include `NullOpsDevs.Libssh.NuGetTest` in solution. - Add basic program to test SSH connection, authentication, and command execution. - Reference `NullOpsDevs.LibSsh` version `1.0.0-deploy-test`. - Target .NET 9.0 framework for NuGet test project.
1 parent 9327e3d commit 0f7622e

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

NullOpsDevs.LibSsh.slnx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<File Path=".github\workflows\test.yml" />
44
<File Path=".github\workflows\publish.yml" />
55
</Folder>
6+
<Project Path="NullOpsDevs.Libssh.NuGetTest\NullOpsDevs.Libssh.NuGetTest.csproj" Type="Classic C#" />
67
<Project Path="NullOpsDevs.LibSsh.Test\NullOpsDevs.LibSsh.Test.csproj" Type="Classic C#" />
78
<Project Path="NullOpsDevs.LibSsh/NullOpsDevs.LibSsh.csproj" />
89
</Solution>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net9.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<PackageReference Include="NullOpsDevs.LibSsh" Version="1.0.0-deploy-test" />
12+
</ItemGroup>
13+
14+
</Project>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using NullOpsDevs.LibSsh.Core;
2+
using NullOpsDevs.LibSsh.Credentials;
3+
4+
var ssh = new SshSession();
5+
ssh.Connect("localhost", 2222);
6+
ssh.Authenticate(SshCredential.FromPassword("user", "12345"));
7+
8+
Console.WriteLine(ssh.ExecuteCommand("ls").Stdout);

0 commit comments

Comments
 (0)