mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-10 09:39:24 +00:00
The PR moves ahead the start of proxy process for vm factory so that it waits for both vm and proxy to be up at the same time. This saves about 300ms for new container creation in my local test machine. Fixes: #683 Signed-off-by: Peng Tao <bergwolf@gmail.com>
27 lines
408 B
Go
27 lines
408 B
Go
// Copyright (c) 2018 HyperHQ Inc.
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
package virtcontainers
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestNoopProxy(t *testing.T) {
|
|
n := &noopProxy{}
|
|
assert := assert.New(t)
|
|
|
|
_, url, err := n.start(proxyParams{})
|
|
assert.Nil(err)
|
|
assert.Equal(url, noopProxyURL)
|
|
|
|
err = n.stop(0)
|
|
assert.Nil(err)
|
|
|
|
assert.False(n.consoleWatched())
|
|
}
|