mirror of https://github.com/k3s-io/k3s
Merge pull request #72455 from rojkov/test-e2e-node-gke
e2e-node-tests: fix path to system specspull/564/head
commit
e44330dfab
|
@ -205,6 +205,7 @@ filegroup(
|
|||
"//test/e2e_node/runner/local:all-srcs",
|
||||
"//test/e2e_node/runner/remote:all-srcs",
|
||||
"//test/e2e_node/services:all-srcs",
|
||||
"//test/e2e_node/system:all-srcs",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:public"],
|
||||
|
|
|
@ -20,6 +20,7 @@ go_library(
|
|||
deps = [
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library",
|
||||
"//test/e2e_node/builder:go_default_library",
|
||||
"//test/e2e_node/system:go_default_library",
|
||||
"//test/utils:go_default_library",
|
||||
"//vendor/k8s.io/klog:go_default_library",
|
||||
],
|
||||
|
|
|
@ -27,13 +27,10 @@ import (
|
|||
"k8s.io/klog"
|
||||
|
||||
"k8s.io/kubernetes/test/e2e_node/builder"
|
||||
"k8s.io/kubernetes/test/e2e_node/system"
|
||||
"k8s.io/kubernetes/test/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
systemSpecPath = "k8s.io/kubernetes/cmd/kubeadm/app/util/system/specs"
|
||||
)
|
||||
|
||||
// NodeE2ERemote contains the specific functions in the node e2e test suite.
|
||||
type NodeE2ERemote struct{}
|
||||
|
||||
|
@ -75,7 +72,7 @@ func (n *NodeE2ERemote) SetupTestPackage(tardir, systemSpecName string) error {
|
|||
|
||||
if systemSpecName != "" {
|
||||
// Copy system spec file
|
||||
source := filepath.Join(rootDir, systemSpecPath, systemSpecName+".yaml")
|
||||
source := filepath.Join(rootDir, system.SystemSpecPath, systemSpecName+".yaml")
|
||||
if _, err := os.Stat(source); err != nil {
|
||||
return fmt.Errorf("failed to locate system spec %q: %v", source, err)
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ go_library(
|
|||
importpath = "k8s.io/kubernetes/test/e2e_node/runner/local",
|
||||
deps = [
|
||||
"//test/e2e_node/builder:go_default_library",
|
||||
"//test/e2e_node/system:go_default_library",
|
||||
"//test/utils:go_default_library",
|
||||
"//vendor/k8s.io/klog:go_default_library",
|
||||
],
|
||||
|
|
|
@ -25,6 +25,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"k8s.io/kubernetes/test/e2e_node/builder"
|
||||
"k8s.io/kubernetes/test/e2e_node/system"
|
||||
"k8s.io/kubernetes/test/utils"
|
||||
|
||||
"k8s.io/klog"
|
||||
|
@ -33,11 +34,7 @@ import (
|
|||
var buildDependencies = flag.Bool("build-dependencies", true, "If true, build all dependencies.")
|
||||
var ginkgoFlags = flag.String("ginkgo-flags", "", "Space-separated list of arguments to pass to Ginkgo test runner.")
|
||||
var testFlags = flag.String("test-flags", "", "Space-separated list of arguments to pass to node e2e test.")
|
||||
var systemSpecName = flag.String("system-spec-name", "", "The name of the system spec used for validating the image in the node conformance test. The specs are at k8s.io/kubernetes/cmd/kubeadm/app/util/system/specs/. If unspecified, the default built-in spec (system.DefaultSpec) will be used.")
|
||||
|
||||
const (
|
||||
systemSpecPath = "k8s.io/kubernetes/cmd/kubeadm/app/util/system/specs"
|
||||
)
|
||||
var systemSpecName = flag.String("system-spec-name", "", fmt.Sprintf("The name of the system spec used for validating the image in the node conformance test. The specs are at %s. If unspecified, the default built-in spec (system.DefaultSpec) will be used.", system.SystemSpecPath))
|
||||
|
||||
func main() {
|
||||
klog.InitFlags(nil)
|
||||
|
@ -65,7 +62,7 @@ func main() {
|
|||
if err != nil {
|
||||
klog.Fatalf("Failed to get k8s root directory: %v", err)
|
||||
}
|
||||
systemSpecFile := filepath.Join(rootDir, systemSpecPath, *systemSpecName+".yaml")
|
||||
systemSpecFile := filepath.Join(rootDir, system.SystemSpecPath, *systemSpecName+".yaml")
|
||||
args = append(args, fmt.Sprintf("--system-spec-name=%s --system-spec-file=%s", *systemSpecName, systemSpecFile))
|
||||
}
|
||||
if err := runCommand(ginkgo, args...); err != nil {
|
||||
|
|
|
@ -17,6 +17,7 @@ go_library(
|
|||
importpath = "k8s.io/kubernetes/test/e2e_node/runner/remote",
|
||||
deps = [
|
||||
"//test/e2e_node/remote:go_default_library",
|
||||
"//test/e2e_node/system:go_default_library",
|
||||
"//vendor/github.com/pborman/uuid:go_default_library",
|
||||
"//vendor/golang.org/x/oauth2:go_default_library",
|
||||
"//vendor/golang.org/x/oauth2/google:go_default_library",
|
||||
|
|
|
@ -36,6 +36,7 @@ import (
|
|||
"time"
|
||||
|
||||
"k8s.io/kubernetes/test/e2e_node/remote"
|
||||
"k8s.io/kubernetes/test/e2e_node/system"
|
||||
|
||||
"github.com/pborman/uuid"
|
||||
"golang.org/x/oauth2"
|
||||
|
@ -61,7 +62,7 @@ var buildOnly = flag.Bool("build-only", false, "If true, build e2e_node_test.tar
|
|||
var instanceMetadata = flag.String("instance-metadata", "", "key/value metadata for instances separated by '=' or '<', 'k=v' means the key is 'k' and the value is 'v'; 'k<p' means the key is 'k' and the value is extracted from the local path 'p', e.g. k1=v1,k2<p2")
|
||||
var gubernator = flag.Bool("gubernator", false, "If true, output Gubernator link to view logs")
|
||||
var ginkgoFlags = flag.String("ginkgo-flags", "", "Passed to ginkgo to specify additional flags such as --skip=.")
|
||||
var systemSpecName = flag.String("system-spec-name", "", "The name of the system spec used for validating the image in the node conformance test. The specs are at k8s.io/kubernetes/cmd/kubeadm/app/util/system/specs/. If unspecified, the default built-in spec (system.DefaultSpec) will be used.")
|
||||
var systemSpecName = flag.String("system-spec-name", "", fmt.Sprintf("The name of the system spec used for validating the image in the node conformance test. The specs are at %s. If unspecified, the default built-in spec (system.DefaultSpec) will be used.", system.SystemSpecPath))
|
||||
|
||||
// envs is the type used to collect all node envs. The key is the env name,
|
||||
// and the value is the env value
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["specs.go"],
|
||||
importpath = "k8s.io/kubernetes/test/e2e_node/system",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [":package-srcs"],
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
Copyright 2019 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package system
|
||||
|
||||
const (
|
||||
// SystemSpecPath is a path to spec files used for performing node conformance tests.
|
||||
SystemSpecPath = "test/e2e_node/system/specs"
|
||||
)
|
Loading…
Reference in New Issue