Skip to content

Commit 67cd617

Browse files
update unit tests for 4 instruments due to drop instrument flow update
1 parent 1b4e12f commit 67cd617

File tree

4 files changed

+175
-0
lines changed

4 files changed

+175
-0
lines changed

kic-lib/src/model/ki2600.rs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,11 @@ mod unit {
340340
.times(..)
341341
.withf(|buf: &[u8]| buf == b"*RST\n")
342342
.returning(|buf: &[u8]| Ok(buf.len()));
343+
interface
344+
.expect_write()
345+
.times(..)
346+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
347+
.returning(|buf: &[u8]| Ok(buf.len()));
343348
interface
344349
.expect_write()
345350
.times(..)
@@ -512,6 +517,11 @@ mod unit {
512517
.times(..)
513518
.withf(|buf: &[u8]| buf == b"*RST\n")
514519
.returning(|buf: &[u8]| Ok(buf.len()));
520+
interface
521+
.expect_write()
522+
.times(..)
523+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
524+
.returning(|buf: &[u8]| Ok(buf.len()));
515525
interface
516526
.expect_write()
517527
.times(..)
@@ -659,6 +669,11 @@ mod unit {
659669
.times(..)
660670
.withf(|buf: &[u8]| buf == b"*RST\n")
661671
.returning(|buf: &[u8]| Ok(buf.len()));
672+
interface
673+
.expect_write()
674+
.times(..)
675+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
676+
.returning(|buf: &[u8]| Ok(buf.len()));
662677
interface
663678
.expect_write()
664679
.times(..)
@@ -805,6 +820,11 @@ mod unit {
805820
.times(..)
806821
.withf(|buf: &[u8]| buf == b"*RST\n")
807822
.returning(|buf: &[u8]| Ok(buf.len()));
823+
interface
824+
.expect_write()
825+
.times(..)
826+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
827+
.returning(|buf: &[u8]| Ok(buf.len()));
808828
interface
809829
.expect_write()
810830
.times(..)
@@ -887,6 +907,11 @@ mod unit {
887907
.times(..)
888908
.withf(|buf: &[u8]| buf == b"*RST\n")
889909
.returning(|buf: &[u8]| Ok(buf.len()));
910+
interface
911+
.expect_write()
912+
.times(..)
913+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
914+
.returning(|buf: &[u8]| Ok(buf.len()));
890915
interface
891916
.expect_write()
892917
.times(..)
@@ -969,6 +994,11 @@ mod unit {
969994
.times(..)
970995
.withf(|buf: &[u8]| buf == b"*RST\n")
971996
.returning(|buf: &[u8]| Ok(buf.len()));
997+
interface
998+
.expect_write()
999+
.times(..)
1000+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
1001+
.returning(|buf: &[u8]| Ok(buf.len()));
9721002
interface
9731003
.expect_write()
9741004
.times(..)
@@ -1057,6 +1087,11 @@ mod unit {
10571087
.times(..)
10581088
.withf(|buf: &[u8]| buf == b"*RST\n")
10591089
.returning(|buf: &[u8]| Ok(buf.len()));
1090+
interface
1091+
.expect_write()
1092+
.times(..)
1093+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
1094+
.returning(|buf: &[u8]| Ok(buf.len()));
10601095
interface
10611096
.expect_write()
10621097
.times(..)
@@ -1132,6 +1167,11 @@ mod unit {
11321167
.times(..)
11331168
.withf(|buf: &[u8]| buf == b"*RST\n")
11341169
.returning(|buf: &[u8]| Ok(buf.len()));
1170+
interface
1171+
.expect_write()
1172+
.times(..)
1173+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
1174+
.returning(|buf: &[u8]| Ok(buf.len()));
11351175
interface
11361176
.expect_write()
11371177
.times(..)

kic-lib/src/model/ki3700.rs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,11 @@ mod unit {
337337
.times(..)
338338
.withf(|buf: &[u8]| buf == b"*RST\n")
339339
.returning(|buf: &[u8]| Ok(buf.len()));
340+
interface
341+
.expect_write()
342+
.times(..)
343+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
344+
.returning(|buf: &[u8]| Ok(buf.len()));
340345
interface
341346
.expect_write()
342347
.times(..)
@@ -511,6 +516,11 @@ mod unit {
511516
.times(..)
512517
.withf(|buf: &[u8]| buf == b"*RST\n")
513518
.returning(|buf: &[u8]| Ok(buf.len()));
519+
interface
520+
.expect_write()
521+
.times(..)
522+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
523+
.returning(|buf: &[u8]| Ok(buf.len()));
514524
interface
515525
.expect_write()
516526
.times(..)
@@ -659,6 +669,11 @@ mod unit {
659669
.times(..)
660670
.withf(|buf: &[u8]| buf == b"*RST\n")
661671
.returning(|buf: &[u8]| Ok(buf.len()));
672+
interface
673+
.expect_write()
674+
.times(..)
675+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
676+
.returning(|buf: &[u8]| Ok(buf.len()));
662677
interface
663678
.expect_write()
664679
.times(..)
@@ -806,6 +821,11 @@ mod unit {
806821
.times(..)
807822
.withf(|buf: &[u8]| buf == b"*RST\n")
808823
.returning(|buf: &[u8]| Ok(buf.len()));
824+
interface
825+
.expect_write()
826+
.times(..)
827+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
828+
.returning(|buf: &[u8]| Ok(buf.len()));
809829
interface
810830
.expect_write()
811831
.times(..)
@@ -888,6 +908,11 @@ mod unit {
888908
.times(..)
889909
.withf(|buf: &[u8]| buf == b"*RST\n")
890910
.returning(|buf: &[u8]| Ok(buf.len()));
911+
interface
912+
.expect_write()
913+
.times(..)
914+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
915+
.returning(|buf: &[u8]| Ok(buf.len()));
891916
interface
892917
.expect_write()
893918
.times(..)
@@ -970,6 +995,11 @@ mod unit {
970995
.times(..)
971996
.withf(|buf: &[u8]| buf == b"*RST\n")
972997
.returning(|buf: &[u8]| Ok(buf.len()));
998+
interface
999+
.expect_write()
1000+
.times(..)
1001+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
1002+
.returning(|buf: &[u8]| Ok(buf.len()));
9731003
interface
9741004
.expect_write()
9751005
.times(..)
@@ -1058,6 +1088,11 @@ mod unit {
10581088
.times(..)
10591089
.withf(|buf: &[u8]| buf == b"*RST\n")
10601090
.returning(|buf: &[u8]| Ok(buf.len()));
1091+
interface
1092+
.expect_write()
1093+
.times(..)
1094+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
1095+
.returning(|buf: &[u8]| Ok(buf.len()));
10611096
interface
10621097
.expect_write()
10631098
.times(..)
@@ -1130,6 +1165,11 @@ mod unit {
11301165
.times(..)
11311166
.withf(|buf: &[u8]| buf == b"*RST\n")
11321167
.returning(|buf: &[u8]| Ok(buf.len()));
1168+
interface
1169+
.expect_write()
1170+
.times(..)
1171+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
1172+
.returning(|buf: &[u8]| Ok(buf.len()));
11331173
interface
11341174
.expect_write()
11351175
.times(..)

kic-lib/src/model/tti.rs

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,11 @@ mod unit {
379379
.times(..)
380380
.withf(|buf: &[u8]| buf == b"*RST\n")
381381
.returning(|buf: &[u8]| Ok(buf.len()));
382+
interface
383+
.expect_write()
384+
.times(..)
385+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
386+
.returning(|buf: &[u8]| Ok(buf.len()));
382387
interface
383388
.expect_write()
384389
.times(..)
@@ -551,6 +556,11 @@ mod unit {
551556
.times(..)
552557
.withf(|buf: &[u8]| buf == b"*RST\n")
553558
.returning(|buf: &[u8]| Ok(buf.len()));
559+
interface
560+
.expect_write()
561+
.times(..)
562+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
563+
.returning(|buf: &[u8]| Ok(buf.len()));
554564
interface
555565
.expect_write()
556566
.times(..)
@@ -694,6 +704,11 @@ mod unit {
694704
.times(..)
695705
.withf(|buf: &[u8]| buf == b"*RST\n")
696706
.returning(|buf: &[u8]| Ok(buf.len()));
707+
interface
708+
.expect_write()
709+
.times(..)
710+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
711+
.returning(|buf: &[u8]| Ok(buf.len()));
697712
interface
698713
.expect_write()
699714
.times(..)
@@ -827,6 +842,11 @@ mod unit {
827842
.times(..)
828843
.withf(|buf: &[u8]| buf == b"*RST\n")
829844
.returning(|buf: &[u8]| Ok(buf.len()));
845+
interface
846+
.expect_write()
847+
.times(..)
848+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
849+
.returning(|buf: &[u8]| Ok(buf.len()));
830850
interface
831851
.expect_write()
832852
.times(..)
@@ -884,6 +904,11 @@ mod unit {
884904
.times(..)
885905
.withf(|buf: &[u8]| buf == b"*RST\n")
886906
.returning(|buf: &[u8]| Ok(buf.len()));
907+
interface
908+
.expect_write()
909+
.times(..)
910+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
911+
.returning(|buf: &[u8]| Ok(buf.len()));
887912
interface
888913
.expect_write()
889914
.times(..)
@@ -931,6 +956,11 @@ mod unit {
931956
.times(..)
932957
.withf(|buf: &[u8]| buf == b"*RST\n")
933958
.returning(|buf: &[u8]| Ok(buf.len()));
959+
interface
960+
.expect_write()
961+
.times(..)
962+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
963+
.returning(|buf: &[u8]| Ok(buf.len()));
934964
interface
935965
.expect_write()
936966
.times(..)
@@ -988,6 +1018,13 @@ mod unit {
9881018
.withf(move |buf: &[u8]| buf == e)
9891019
.returning(|buf: &[u8]| Ok(buf.len()));
9901020
}
1021+
1022+
interface
1023+
.expect_write()
1024+
.times(..)
1025+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
1026+
.returning(|buf: &[u8]| Ok(buf.len()));
1027+
9911028
let mut instrument: Instrument = Instrument::new(
9921029
protocol::Protocol::Raw(Raw::new(interface)),
9931030
Authentication::NoAuth,
@@ -1036,6 +1073,12 @@ mod unit {
10361073
.withf(move |buf: &[u8]| buf == e)
10371074
.returning(|buf: &[u8]| Ok(buf.len()));
10381075
}
1076+
1077+
interface
1078+
.expect_write()
1079+
.times(..)
1080+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
1081+
.returning(|buf: &[u8]| Ok(buf.len()));
10391082
let mut instrument: Instrument = Instrument::new(
10401083
protocol::Protocol::Raw(Raw::new(interface)),
10411084
Authentication::NoAuth,
@@ -1085,6 +1128,12 @@ mod unit {
10851128
.returning(|buf: &[u8]| Ok(buf.len()));
10861129
}
10871130

1131+
interface
1132+
.expect_write()
1133+
.times(..)
1134+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
1135+
.returning(|buf: &[u8]| Ok(buf.len()));
1136+
10881137
let mut instrument: Instrument = Instrument::new(
10891138
protocol::Protocol::Raw(Raw::new(interface)),
10901139
Authentication::NoAuth,
@@ -1135,6 +1184,12 @@ mod unit {
11351184
.returning(|buf: &[u8]| Ok(buf.len()));
11361185
}
11371186

1187+
interface
1188+
.expect_write()
1189+
.times(..)
1190+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
1191+
.returning(|buf: &[u8]| Ok(buf.len()));
1192+
11381193
let mut instrument: Instrument = Instrument::new(
11391194
protocol::Protocol::Raw(Raw::new(interface)),
11401195
Authentication::NoAuth,
@@ -1213,6 +1268,11 @@ mod unit {
12131268
.times(..)
12141269
.withf(|buf: &[u8]| buf == b"*RST\n")
12151270
.returning(|buf: &[u8]| Ok(buf.len()));
1271+
interface
1272+
.expect_write()
1273+
.times(..)
1274+
.withf(|buf: &[u8]| buf == b"localnode.prompts = 0\n")
1275+
.returning(|buf: &[u8]| Ok(buf.len()));
12161276
interface
12171277
.expect_write()
12181278
.times(..)

0 commit comments

Comments
 (0)