2017-10-17 19:50:27 -03:00
|
|
|
/*
|
2017-11-05 18:35:46 -03:00
|
|
|
Copyright 2017 The Kubernetes Authors.
|
|
|
|
|
|
2017-10-17 19:50:27 -03:00
|
|
|
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
|
2017-11-05 18:35:46 -03:00
|
|
|
|
2017-10-17 19:50:27 -03:00
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
2017-11-05 18:35:46 -03:00
|
|
|
|
2017-10-17 19:50:27 -03:00
|
|
|
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 e2e
|
|
|
|
|
|
|
|
|
|
import (
|
2018-10-29 13:01:41 -03:00
|
|
|
"os"
|
2017-10-17 19:50:27 -03:00
|
|
|
"testing"
|
|
|
|
|
|
|
|
|
|
"github.com/onsi/ginkgo"
|
|
|
|
|
"github.com/onsi/ginkgo/config"
|
2019-03-28 20:43:18 -03:00
|
|
|
"k8s.io/component-base/logs"
|
2018-10-29 13:01:41 -03:00
|
|
|
|
2017-12-02 12:02:00 -03:00
|
|
|
// required
|
2017-10-17 19:50:27 -03:00
|
|
|
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
|
|
|
|
|
2017-11-13 17:26:13 -03:00
|
|
|
"k8s.io/ingress-nginx/test/e2e/framework"
|
|
|
|
|
|
2017-12-02 12:02:00 -03:00
|
|
|
// tests to run
|
2017-11-18 07:22:42 -03:00
|
|
|
_ "k8s.io/ingress-nginx/test/e2e/annotations"
|
2019-02-08 11:25:04 -05:00
|
|
|
_ "k8s.io/ingress-nginx/test/e2e/dbg"
|
2017-11-18 07:22:42 -03:00
|
|
|
_ "k8s.io/ingress-nginx/test/e2e/defaultbackend"
|
2018-12-11 11:37:19 +01:00
|
|
|
_ "k8s.io/ingress-nginx/test/e2e/gracefulshutdown"
|
2019-06-27 10:03:20 -04:00
|
|
|
_ "k8s.io/ingress-nginx/test/e2e/leaks"
|
2018-11-12 10:19:52 -05:00
|
|
|
_ "k8s.io/ingress-nginx/test/e2e/loadbalance"
|
2018-04-01 16:09:27 -04:00
|
|
|
_ "k8s.io/ingress-nginx/test/e2e/lua"
|
2019-12-24 22:50:25 -03:00
|
|
|
_ "k8s.io/ingress-nginx/test/e2e/security"
|
2018-06-11 09:45:38 +08:00
|
|
|
_ "k8s.io/ingress-nginx/test/e2e/servicebackend"
|
2017-11-18 07:22:42 -03:00
|
|
|
_ "k8s.io/ingress-nginx/test/e2e/settings"
|
2017-11-14 17:50:08 -03:00
|
|
|
_ "k8s.io/ingress-nginx/test/e2e/ssl"
|
2018-10-29 13:01:41 -03:00
|
|
|
_ "k8s.io/ingress-nginx/test/e2e/status"
|
2018-11-16 17:33:56 -03:00
|
|
|
_ "k8s.io/ingress-nginx/test/e2e/tcpudp"
|
2017-10-17 19:50:27 -03:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// RunE2ETests checks configuration parameters (specified through flags) and then runs
|
|
|
|
|
// E2E tests using the Ginkgo runner.
|
|
|
|
|
func RunE2ETests(t *testing.T) {
|
|
|
|
|
logs.InitLogs()
|
|
|
|
|
defer logs.FlushLogs()
|
|
|
|
|
|
|
|
|
|
// Disable skipped tests unless they are explicitly requested.
|
|
|
|
|
if config.GinkgoConfig.FocusString == "" && config.GinkgoConfig.SkipString == "" {
|
|
|
|
|
config.GinkgoConfig.SkipString = `\[Flaky\]|\[Feature:.+\]`
|
|
|
|
|
}
|
|
|
|
|
|
2018-10-29 13:01:41 -03:00
|
|
|
if os.Getenv("KUBECTL_PATH") != "" {
|
|
|
|
|
framework.KubectlPath = os.Getenv("KUBECTL_PATH")
|
|
|
|
|
framework.Logf("Using kubectl path '%s'", framework.KubectlPath)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
framework.Logf("Starting e2e run %q on Ginkgo node %d", framework.RunID, config.GinkgoConfig.ParallelNode)
|
2017-10-17 19:50:27 -03:00
|
|
|
ginkgo.RunSpecs(t, "nginx-ingress-controller e2e suite")
|
|
|
|
|
}
|