mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-21 00:04:19 +01:00
device: use const strings for block-driver option instead of hard coding
Currently, the block driver option is specifed by hard coding, maybe it is better to use const string variables instead of hard coded strings. Another modification is to remove duplicate consts for virtio driver in manager.go. Fixes: #3321 Signed-off-by: Jason Zhang <zhanghj.lc@inspur.com>
This commit is contained in:
@@ -86,7 +86,7 @@ func TestContainerRemoveDrive(t *testing.T) {
|
||||
sandbox := &Sandbox{
|
||||
ctx: context.Background(),
|
||||
id: "sandbox",
|
||||
devManager: manager.NewDeviceManager(manager.VirtioSCSI, false, "", nil),
|
||||
devManager: manager.NewDeviceManager(config.VirtioSCSI, false, "", nil),
|
||||
config: &SandboxConfig{},
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ func TestContainerAddDriveDir(t *testing.T) {
|
||||
sandbox := &Sandbox{
|
||||
ctx: context.Background(),
|
||||
id: testSandboxID,
|
||||
devManager: manager.NewDeviceManager(manager.VirtioSCSI, false, "", nil),
|
||||
devManager: manager.NewDeviceManager(config.VirtioSCSI, false, "", nil),
|
||||
hypervisor: &mockHypervisor{},
|
||||
agent: &mockAgent{},
|
||||
config: &SandboxConfig{
|
||||
|
||||
Reference in New Issue
Block a user