mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
vendor update for CSI 0.3.0
This commit is contained in:
1
vendor/k8s.io/kubernetes/pkg/api/testing/compat/BUILD
generated
vendored
1
vendor/k8s.io/kubernetes/pkg/api/testing/compat/BUILD
generated
vendored
@ -11,7 +11,6 @@ go_library(
|
||||
importpath = "k8s.io/kubernetes/pkg/api/testing/compat",
|
||||
deps = [
|
||||
"//pkg/api/legacyscheme:go_default_library",
|
||||
"//pkg/printers:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
|
||||
|
18
vendor/k8s.io/kubernetes/pkg/api/testing/compat/compatibility_tester.go
generated
vendored
18
vendor/k8s.io/kubernetes/pkg/api/testing/compat/compatibility_tester.go
generated
vendored
@ -19,7 +19,6 @@ package compat
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"strconv"
|
||||
@ -30,7 +29,6 @@ import (
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/util/validation/field"
|
||||
"k8s.io/kubernetes/pkg/api/legacyscheme"
|
||||
"k8s.io/kubernetes/pkg/printers"
|
||||
)
|
||||
|
||||
// Based on: https://github.com/openshift/origin/blob/master/pkg/api/compatibility_test.go
|
||||
@ -72,14 +70,11 @@ func TestCompatibility(
|
||||
t.Fatalf("Unexpected error: %v", err)
|
||||
}
|
||||
|
||||
hasError := false
|
||||
for k, expectedValue := range expectedKeys {
|
||||
keys := strings.Split(k, ".")
|
||||
if actualValue, ok, err := getJSONValue(generic, keys...); err != nil || !ok {
|
||||
t.Errorf("Unexpected error for %s: %v", k, err)
|
||||
hasError = true
|
||||
} else if !reflect.DeepEqual(expectedValue, fmt.Sprintf("%v", actualValue)) {
|
||||
hasError = true
|
||||
t.Errorf("Unexpected value for %v: expected %v, got %v", k, expectedValue, actualValue)
|
||||
}
|
||||
}
|
||||
@ -89,14 +84,17 @@ func TestCompatibility(
|
||||
actualValue, ok, err := getJSONValue(generic, keys...)
|
||||
if err == nil || ok {
|
||||
t.Errorf("Unexpected value found for key %s: %v", absentKey, actualValue)
|
||||
hasError = true
|
||||
}
|
||||
}
|
||||
|
||||
if hasError {
|
||||
printer := &printers.JSONPrinter{}
|
||||
printer.PrintObj(obj, os.Stdout)
|
||||
t.Logf("2: Encoded value: %#v", string(output))
|
||||
if t.Failed() {
|
||||
data, err := json.MarshalIndent(obj, "", " ")
|
||||
if err != nil {
|
||||
t.Log(err)
|
||||
} else {
|
||||
t.Log(string(data))
|
||||
}
|
||||
t.Logf("2: Encoded value: %v", string(output))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user