Use openapi fixture for server-side apply tests

This commit is contained in:
Jordan Liggitt 2019-12-04 10:29:48 -05:00
parent f2f22b84cd
commit 2b4fac5760
3 changed files with 4197 additions and 5 deletions

View File

@ -40,7 +40,7 @@ go_test(
"typeconverter_test.go",
"versionconverter_test.go",
],
data = ["//api/openapi-spec"],
data = glob(["testdata/**"]),
embed = [":go_default_library"],
deps = [
"//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library",

View File

@ -20,7 +20,6 @@ import (
"fmt"
"path/filepath"
"reflect"
"strings"
"testing"
"sigs.k8s.io/structured-merge-diff/typed"
@ -33,9 +32,7 @@ import (
)
var fakeSchema = prototesting.Fake{
Path: filepath.Join(
strings.Repeat(".."+string(filepath.Separator), 9),
"api", "openapi-spec", "swagger.json"),
Path: filepath.Join("testdata", "swagger.json"),
}
func TestTypeConverter(t *testing.T) {