Containerd client integration
This commit: 1) Replaces the usage of containerd GRPC APIs with the containerd client for all operations related to containerd. 2) Updated containerd to v1.0alpha4+ 3) Updated runc to v1.0.0 Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
This commit is contained in:
@@ -18,33 +18,12 @@ package server
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
|
||||
)
|
||||
|
||||
func TestResources(t *testing.T) {
|
||||
const threads = 10
|
||||
var wg sync.WaitGroup
|
||||
r := newResourceSet()
|
||||
for i := 0; i < threads; i++ {
|
||||
wg.Add(1)
|
||||
go func(ref string) {
|
||||
r.add(ref)
|
||||
wg.Done()
|
||||
}(fmt.Sprintf("sha256:%d", i))
|
||||
}
|
||||
wg.Wait()
|
||||
refs := r.all()
|
||||
for i := 0; i < threads; i++ {
|
||||
_, ok := refs[fmt.Sprintf("sha256:%d", i)]
|
||||
assert.True(t, ok)
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseAuth(t *testing.T) {
|
||||
testUser := "username"
|
||||
testPasswd := "password"
|
||||
|
Reference in New Issue
Block a user