mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-14 05:19:21 +00:00
Merge pull request #474 from merwick/2.0-dev
Kata 2.0-dev port of #2867 (NoReboot Knob)
This commit is contained in:
@@ -481,6 +481,7 @@ func (q *qemu) createSandbox(ctx context.Context, id string, networkNS NetworkNa
|
||||
NoUserConfig: true,
|
||||
NoDefaults: true,
|
||||
NoGraphic: true,
|
||||
NoReboot: true,
|
||||
Daemonize: true,
|
||||
MemPrealloc: q.config.MemPrealloc,
|
||||
HugePages: q.config.HugePages,
|
||||
|
@@ -187,6 +187,24 @@ func TestQemuMemoryTopology(t *testing.T) {
|
||||
assert.Exactly(memory, expectedOut)
|
||||
}
|
||||
|
||||
func TestQemuKnobs(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
sandbox, err := createQemuSandboxConfig()
|
||||
assert.NoError(err)
|
||||
|
||||
q := &qemu{
|
||||
store: sandbox.newStore,
|
||||
}
|
||||
err = q.createSandbox(context.Background(), sandbox.id, NetworkNamespace{}, &sandbox.config.HypervisorConfig)
|
||||
assert.NoError(err)
|
||||
|
||||
assert.Equal(q.qemuConfig.Knobs.NoUserConfig, true)
|
||||
assert.Equal(q.qemuConfig.Knobs.NoDefaults, true)
|
||||
assert.Equal(q.qemuConfig.Knobs.NoGraphic, true)
|
||||
assert.Equal(q.qemuConfig.Knobs.NoReboot, true)
|
||||
}
|
||||
|
||||
func testQemuAddDevice(t *testing.T, devInfo interface{}, devType deviceType, expected []govmmQemu.Device) {
|
||||
assert := assert.New(t)
|
||||
q := &qemu{
|
||||
|
Reference in New Issue
Block a user