[mariadb] fix protocol tests

This commit is contained in:
Ryan Leckey 2019-09-10 17:49:21 -07:00
parent 01dbcd3ff5
commit d5a543d5cf
4 changed files with 4 additions and 7 deletions

View File

@ -31,7 +31,7 @@ mod tests {
fn it_encodes_com_stmt_close() {
let mut buf = Vec::new();
ComStmtClose { statement_id: 1 }.encode(&mut buf);
ComStmtClose { statement_id: 1 }.encode(&mut buf, Capabilities::empty());
assert_eq!(&buf[..], b"\x19\x01\0\0\0");
}

View File

@ -39,6 +39,6 @@ mod tests {
}
.encode(&mut buf, Capabilities::empty());
assert_eq!(&buf[..], b"\x09\0\0\x00\x1C\x01\0\0\0\x0A\0\0\0");
assert_eq!(&buf[..], b"\x1C\x01\0\0\0\x0A\0\0\0");
}
}

View File

@ -34,9 +34,6 @@ mod tests {
}
.encode(&mut buf, Capabilities::empty());
assert_eq!(
&buf[..],
"\x27\0\0\x00\x16SELECT * FROM users WHERE username = ?"
);
assert_eq!(&buf[..], &b"\x16SELECT * FROM users WHERE username = ?"[..]);
}
}

View File

@ -29,6 +29,6 @@ mod tests {
ComStmtReset { statement_id: 1 }.encode(&mut buf, Capabilities::empty());
assert_eq!(&buf[..], b"\x05\0\0\x00\x1A\x01\0\0\0");
assert_eq!(&buf[..], b"\x1A\x01\0\0\0");
}
}