mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-22 13:38:26 +00:00
qmp_test: Change QMP version from 2.6 to 2.9
Also change TestQMPXBlockdevDel to TestQMPBlockdevDel because QMP verion 2.9 and older use blockdev-del but not x-blockdev-del. Signed-off-by: Hui Zhu <teawater@hyper.sh>
This commit is contained in:
parent
e82e8498c5
commit
a0b0c86e9c
@ -33,10 +33,10 @@ import (
|
||||
|
||||
const (
|
||||
microStr = "50"
|
||||
minorStr = "6"
|
||||
minorStr = "9"
|
||||
majorStr = "2"
|
||||
micro = 50
|
||||
minor = 6
|
||||
minor = 9
|
||||
major = 2
|
||||
cap1 = "one"
|
||||
cap2 = "two"
|
||||
@ -562,17 +562,17 @@ func TestQMPSCSIDeviceAdd(t *testing.T) {
|
||||
<-disconnectedCh
|
||||
}
|
||||
|
||||
// Checks that the x-blockdev-del command is correctly sent.
|
||||
// Checks that the blockdev-del command is correctly sent.
|
||||
//
|
||||
// We start a QMPLoop, send the x-blockdev-del command and stop the loop.
|
||||
// We start a QMPLoop, send the blockdev-del command and stop the loop.
|
||||
//
|
||||
// The x-blockdev-del command should be correctly sent and the QMP loop should
|
||||
// The blockdev-del command should be correctly sent and the QMP loop should
|
||||
// exit gracefully.
|
||||
func TestQMPXBlockdevDel(t *testing.T) {
|
||||
func TestQMPBlockdevDel(t *testing.T) {
|
||||
connectedCh := make(chan *QMPVersion)
|
||||
disconnectedCh := make(chan struct{})
|
||||
buf := newQMPTestCommandBuffer(t)
|
||||
buf.AddCommand("x-blockdev-del", nil, "return", nil)
|
||||
buf.AddCommand("blockdev-del", nil, "return", nil)
|
||||
cfg := QMPConfig{Logger: qmpTestLogger{}}
|
||||
q := startQMPLoop(buf, cfg, connectedCh, disconnectedCh)
|
||||
q.version = checkVersion(t, connectedCh)
|
||||
|
Loading…
Reference in New Issue
Block a user