manually fix unit tests
This commit is contained in:
@@ -19,11 +19,12 @@ package qos
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/helper/qos"
|
||||
"k8s.io/api/core/v1"
|
||||
k8sv1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
)
|
||||
|
||||
func TestGetPodQOS(t *testing.T) {
|
||||
@@ -137,7 +138,7 @@ func TestGetPodQOS(t *testing.T) {
|
||||
|
||||
// Convert v1.Pod to api.Pod, and then check against `api.helper.GetPodQOS`.
|
||||
pod := api.Pod{}
|
||||
v1.Convert_v1_Pod_To_api_Pod(testCase.pod, &pod, nil)
|
||||
k8sv1.Convert_v1_Pod_To_api_Pod(testCase.pod, &pod, nil)
|
||||
|
||||
if actual := qos.GetPodQOS(&pod); api.PodQOSClass(testCase.expected) != actual {
|
||||
t.Errorf("[%d]: invalid qos pod %s, expected: %s, actual: %s", id, testCase.pod.Name, testCase.expected, actual)
|
||||
|
Reference in New Issue
Block a user