Skip to content

Commit 1e802c7

Browse files
committed
Update tests as we now load data from an offset as not to include the packet length and/or message type.
1 parent 5529efc commit 1e802c7

File tree

10 files changed

+41
-52
lines changed

10 files changed

+41
-52
lines changed

src/Renci.SshNet.Tests/Classes/Messages/Connection/ChannelDataMessageTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public void Constructor_LocalChannelNumberAndData()
4343
public void Constructor_LocalChannelNumberAndData_ShouldThrowArgumentNullExceptionWhenDataIsNull()
4444
{
4545
var localChannelNumber = (uint) new Random().Next(0, int.MaxValue);
46-
byte[] data = null;
46+
const byte[] data = null;
4747

4848
try
4949
{
@@ -142,7 +142,7 @@ public void Load()
142142
var bytes = channelDataMessage.GetBytes();
143143
var target = new ChannelDataMessage();
144144

145-
target.Load(bytes);
145+
target.Load(bytes, 1, bytes.Length - 1); // skip message type
146146

147147
Assert.IsTrue(target.Data.SequenceEqual(data.Take(offset, size)));
148148
Assert.AreEqual(0, target.Offset);

src/Renci.SshNet.Tests/Classes/Messages/Connection/ChannelOpen/ChannelOpenMessageTest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public void Load_DirectTcpipChannelInfo()
124124
var target = new ChannelOpenMessage(localChannelNumber, initialWindowSize, maximumPacketSize, info);
125125
var bytes = target.GetBytes();
126126

127-
target.Load(bytes);
127+
target.Load(bytes, 1, bytes.Length - 1); // skip message type
128128

129129
Assert.AreEqual(info.ChannelType, _ascii.GetString(target.ChannelType));
130130
Assert.IsNotNull(target.Info);
@@ -151,7 +151,7 @@ public void Load_ForwardedTcpipChannelInfo()
151151
var target = new ChannelOpenMessage(localChannelNumber, initialWindowSize, maximumPacketSize, info);
152152
var bytes = target.GetBytes();
153153

154-
target.Load(bytes);
154+
target.Load(bytes, 1, bytes.Length - 1); // skip message type
155155

156156
Assert.AreEqual(info.ChannelType, _ascii.GetString(target.ChannelType));
157157
Assert.IsNotNull(target.Info);
@@ -178,7 +178,7 @@ public void Load_SessionChannelOpenInfo()
178178
var target = new ChannelOpenMessage(localChannelNumber, initialWindowSize, maximumPacketSize, info);
179179
var bytes = target.GetBytes();
180180

181-
target.Load(bytes);
181+
target.Load(bytes, 1, bytes.Length - 1); // skip message type
182182

183183
Assert.AreEqual(info.ChannelType, _ascii.GetString(target.ChannelType));
184184
Assert.IsNotNull(target.Info);
@@ -202,7 +202,7 @@ public void Load_X11ChannelOpenInfo()
202202
var target = new ChannelOpenMessage(localChannelNumber, initialWindowSize, maximumPacketSize, info);
203203
var bytes = target.GetBytes();
204204

205-
target.Load(bytes);
205+
target.Load(bytes, 1, bytes.Length - 1); // skip message type
206206

207207
Assert.AreEqual(info.ChannelType, _ascii.GetString(target.ChannelType));
208208
Assert.IsNotNull(target.Info);
@@ -238,7 +238,7 @@ public void Load_ShouldThrowNotSupportedExceptionWhenChannelTypeIsNotSupported()
238238

239239
try
240240
{
241-
target.Load(bytes);
241+
target.Load(bytes, 1, bytes.Length - 1); // skip message type
242242
Assert.Fail();
243243
}
244244
catch (NotSupportedException ex)

src/Renci.SshNet.Tests/Classes/Messages/Transport/KeyExchangeDhGroupExchangeReplyTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class KeyExchangeDhGroupExchangeReplyTest : TestBase
2020
public void Test_KeyExchangeDhGroupExchangeReply_Load()
2121
{
2222
var m = new KeyExchangeDhGroupExchangeReply();
23-
var input = new byte[] { 0x21, 0x00, 0x00, 0x01, 0x17, 0x00, 0x00, 0x00, 0x07, 0x73, 0x73, 0x68, 0x2d, 0x72, 0x73, 0x61, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0xce, 0x38, 0xdf, 0x0d, 0x04, 0x2c, 0x10, 0x45, 0x8f, 0x5e, 0xeb, 0xc2, 0x35, 0x01, 0xd5, 0x4d, 0x09, 0xa3, 0xee, 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, 0xbb, 0x40, 0x9e, 0xb3, 0x45, 0x04, 0x7f, 0xd1, 0x84, 0xad, 0x90, 0x8b, 0x2d, 0xb6, 0x13, 0xfb, 0x7a, 0xf5, 0xad, 0xbf, 0xa6, 0x74, 0x75, 0xfa, 0x70, 0x59, 0xae, 0x22, 0xbb, 0xfb, 0x09, 0x68, 0xae, 0xe5, 0x26, 0x5c, 0xbd, 0xe0, 0xae, 0x39, 0xbb, 0xaa, 0x59, 0x4c, 0x73, 0x11, 0x01, 0x64, 0x6d, 0xc1, 0x95, 0x1b, 0x93, 0x6b, 0x14, 0x83, 0x4a, 0xdc, 0x16, 0x67, 0x7b, 0x85, 0xd0, 0x89, 0x2e, 0x3c, 0xa1, 0x05, 0x34, 0xf0, 0xd2, 0xb9, 0x3b, 0x83, 0xf4, 0x02, 0xd4, 0x7f, 0x73, 0x76, 0x5d, 0xc2, 0x67, 0xb9, 0xac, 0x8a, 0xd1, 0xab, 0xd4, 0x82 };
23+
var input = new byte[] { 0x00, 0x00, 0x01, 0x17, 0x00, 0x00, 0x00, 0x07, 0x73, 0x73, 0x68, 0x2d, 0x72, 0x73, 0x61, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0xce, 0x38, 0xdf, 0x0d, 0x04, 0x2c, 0x10, 0x45, 0x8f, 0x5e, 0xeb, 0xc2, 0x35, 0x01, 0xd5, 0x4d, 0x09, 0xa3, 0xee, 0x74, 0x3d, 0x75, 0xcf, 0xf4, 0xf3, 0x4f, 0xc9, 0xf9, 0x2e, 0x59, 0xd6, 0xb8, 0x69, 0x85, 0x16, 0xac, 0x33, 0x5b, 0x2a, 0x2a, 0xf8, 0x9c, 0xc4, 0xc3, 0x87, 0xd6, 0xb8, 0x50, 0x6c, 0xed, 0x60, 0x9c, 0x0f, 0x83, 0x37, 0xb3, 0xa2, 0x25, 0xbe, 0x07, 0xde, 0xb6, 0x1f, 0x28, 0xab, 0x05, 0x21, 0xc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 0xc1, 0x95, 0x1b, 0x93, 0x6b, 0x14, 0x83, 0x4a, 0xdc, 0x16, 0x67, 0x7b, 0x85, 0xd0, 0x89, 0x2e, 0x3c, 0xa1, 0x05, 0x34, 0xf0, 0xd2, 0xb9, 0x3b, 0x83, 0xf4, 0x02, 0xd4, 0x7f, 0x73, 0x76, 0x5d, 0xc2, 0x67, 0xb9, 0xac, 0x8a, 0xd1, 0xab, 0xd4, 0x82 };
2424
m.Load(input);
2525

2626
Assert.IsTrue(m.HostKey.SequenceEqual(new byte[] { 0x00, 0x00, 0x00, 0x07, 0x73, 0x73, 0x68, 0x2d, 0x72, 0x73, 0x61, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0xce, 0x38, 0xdf, 0x0d, 0x04, 0x2c, 0x10, 0x45, 0x8f, 0x5e, 0xeb, 0xc2, 0x35, 0x01, 0xd5, 0x4d, 0x09, 0xa3, 0xee, 0x74, 0x3d, 0x75, 0xcf, 0xf4, 0xf3, 0x4f, 0xc9, 0xf9, 0x2e, 0x59, 0xd6, 0xb8, 0x69, 0x85, 0x16, 0xac, 0x33, 0x5b, 0x2a, 0x2a, 0xf8, 0x9c, 0xc4, 0xc3, 0x87, 0xd6, 0xb8, 0x50, 0x6c, 0xed, 0x60, 0x9c, 0x0f, 0x83, 0x37, 0xb3, 0xa2, 0x25, 0xbe, 0x07, 0xde, 0xb6, 0x1f, 0x28, 0xab, 0x05, 0x21, 0xc0, 0x23, 0xf7, 0xd6, 0xca, 0xcb, 0x03, 0x42, 0x69, 0x31, 0x93, 0x2b, 0x3b, 0x94, 0xb8, 0x3b, 0x90, 0xe6, 0x25, 0x7c, 0x23, 0xc5, 0x24, 0x89, 0x65, 0x37, 0x7b, 0x56, 0x54, 0xa2, 0x23, 0xcb, 0xeb, 0xf0, 0xe9, 0xd1, 0x07, 0x88, 0x36, 0x8f, 0xef, 0x65, 0x71, 0xac, 0x80, 0x5c, 0x81, 0x0a, 0x95, 0x1c, 0xf5, 0xc0, 0x5d, 0xd3, 0xd4, 0x10, 0x0e, 0x4f, 0xcf, 0x87, 0x80, 0xa5, 0xde, 0x6e, 0xff, 0x89, 0x9c, 0xfc, 0x2f, 0x85, 0xf5, 0x93, 0xff, 0x70, 0x8e, 0x48, 0xb6, 0x6e, 0x6e, 0x0a, 0x18, 0xa3, 0xbb, 0x1c, 0x56, 0x60, 0xf1, 0x9d, 0x2a, 0xca, 0xbf, 0xa0, 0x84, 0x73, 0xb1, 0x6d, 0x10, 0x75, 0xcc, 0xa3, 0x20, 0xed, 0x00, 0x52, 0xd0, 0x84, 0x5a, 0xc9, 0xbb, 0x17, 0x84, 0x96, 0x40, 0x48, 0xe2, 0x8e, 0x84, 0x30, 0x82, 0x3b, 0x87, 0xa4, 0x54, 0x55, 0x8c, 0xb5, 0x62, 0x97, 0xd7, 0xf1, 0xa3, 0x8b, 0x44, 0xaa, 0x34, 0xfd, 0xe9, 0xad, 0xda, 0xeb, 0x45, 0x27, 0xfb, 0xad, 0xea, 0x9a, 0x0c, 0x38, 0x30, 0x27, 0x6a, 0x82, 0xc2, 0xc2, 0x0a, 0xa0, 0xed, 0x30, 0x2f, 0x50, 0x9f, 0xdb, 0x1a, 0xfb, 0x29, 0x1c, 0x8a, 0x28, 0x3f, 0xd6, 0xf6, 0xa9, 0xeb, 0x76, 0x60, 0xa2, 0x56, 0xa2, 0x90, 0x32, 0xcd, 0x25, 0x41, 0xb7, 0xc0, 0x9e, 0x13, 0x97, 0xaf }));

src/Renci.SshNet.Tests/Classes/Messages/Transport/KeyExchangeDhGroupExchangeRequestTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void Load()
6060
var bytes = request.GetBytes();
6161
var target = new KeyExchangeDhGroupExchangeRequest(0, 0, 0);
6262

63-
target.Load(bytes);
63+
target.Load(bytes, 1, bytes.Length - 1);
6464

6565
Assert.AreEqual(_minimum, target.Minimum);
6666
Assert.AreEqual(_preferred, target.Preferred);

0 commit comments

Comments
 (0)