Commit Graph

22 Commits

Author SHA1 Message Date
ahrtr
fe95aa614c io/ioutil has already been deprecated in golang 1.16, so replace all ioutil with io and os 2022-02-03 05:32:12 +08:00
Patrick Ohly
81b4a695b3 test/integration: skip etcd startup for -help flag
By parsing flags in the test's main function before starting etcd we bail out
early without ever starting etcd when the test was invoked with -help.

Otherwise etcd must be available, gets started and then hangs because
flag.Parse itself exits when called by testing.go. This bypasses the code in
EtcdMain which normally stops etcd.
2021-09-24 11:51:58 +02:00
Jordan Liggitt
52b629efbc Drop use of deprecated clientv3.SetLogger 2021-06-15 09:53:06 -04:00
Jordan Liggitt
2979c3325e Switch to go.etcd.io/etcd/client/v3 2021-06-15 09:53:06 -04:00
Marek Siarkowicz
12447bc803 Upgrade etcd server version to 3.5.0-rc.0 2021-06-09 17:00:05 +02:00
Benjamin Elder
1a7cf6c91a remove bazel logic from test/integration/framework 2021-03-07 15:27:44 -08:00
tiloso
3cbdc711de Fix staticcheck in test/integration/{examples,framework}
Part of #92402, fixes staticcheck failures SA1006, SA1019 and SA2002 in
test/integration/examples and test/integration/framework.
2020-12-14 21:54:37 +01:00
wojtekt
af61e8fbdf Test watchcache being updated in multietcd setup 2020-09-15 08:19:13 +02:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Wenjia Zhang
3b274fad2a Replace github.com/coreos/etcd by go.etcd.io/etcd 2019-10-24 14:09:24 -07:00
Bin Lu
34f95a8985 Bug fix: remove etcd related issues in bazel-test-integration
Signed-off-by: Bin Lu <bin.lu@arm.com>
2019-06-04 22:09:48 -07:00
Kubernetes Prow Robot
01f0be4901
Merge pull request #76639 from lubinsz/pr_bzl_arm64
Add an environment variable for bazel-test-integration on Arm
2019-05-17 02:04:06 -07:00
Bin Lu
51ee2b1f0b Add an environment variable for bazel-test-integration on Arm
Signed-off-by: Bin Lu <bin.lu@arm.com>
2019-05-16 16:53:18 +08:00
Jordan Liggitt
aee1997a19 quiet integration test logs 2019-04-20 02:20:31 -04:00
Andrew Sy Kim
e26157df07 fix link to etcd install docs 2019-03-26 13:40:18 -04:00
Bin Lu
973a3c7233 Add bazel-test-integration for Arm64
Signed-off-by: Bin Lu <bin.lu@arm.com>
2019-03-08 14:01:15 +08:00
Ben Moss
34ac4d9ee9 Update deprecated links 2019-02-15 09:13:07 -05:00
Davanum Srinivas
8c8c01f913
Add debug logs for etcd server in integration tests
Change-Id: Ic1dd8a7c7e0adef27b969007e24c2eb089d6bb12
2019-01-04 15:22:29 -05:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Jonathan Basseri
117288e285 Make integration test work with go test.
The EtcdMain function in integration tests is designed to launch an etcd
instance only when running in a bazel test. For non-bazel, we rely on
hack/make-rules/test-integration.sh to bring up the etcd instance.

This patch fixes the following in EtcdMain:
1. If etcd is not found in ${RUNFILES_DIR} then look in ${PATH}.
2. Try to connect to the etcd started by `make test-integraion`; if it
   is up, then don't start etcd.
3. Gracefully shut down etcd after tests.
4. Get a port from the OS instead of deriving it from argv[0].
5. Don't use sync.Once.

The benefit of this change is that integration tests work with `go test`
as well as `make test-integration` without users needing to do anything
special. That makes it much easier to pass go testing flags to tests and
integrate with IDEs.
2018-09-10 14:12:25 -07:00
dhilipkumars
fd8758b047 Extend apiserver testserver such that in can be used in integration tests
abstract out etcd server creation
test/integration/framework: cleanup master_utils.go
kube-apiserver: move StartTestServer tests into test/integration/master
Fix the failing scale test
kube-apiserver's TestServer now returns a struct instead of individual values
2017-11-22 15:16:25 +05:30
Mike Danese
8e23c656ca add testmain setup func to the integration framework 2017-07-12 17:34:55 -07:00