Improve examples test (#9467)
This PR moves the examples test to where it belongs and also include the following improvements: - Removed test cases defined for non-existent files; - Add guard against ineffective tests against missing files; - Remove the special case for scheduler-policy-config which is no longer an example, the dependency on the related go module is thus eliminated; - Updated the .tavis.yml file to use the new test case: the instruction sequence is adjusted to ensure the correct version of kubernetes is fully prepared before we do `go get -v -t`. - The examples_test.go is formatted using `gofmt`; - Verbose output during test has been added. - A separate test case is added for CN translation. Related: #9285
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
Note: These tests are importing code from kubernetes that isn't really
|
||||
meant to be used outside the repo. This causes vendoring problems. As
|
||||
a result, we have to work around those with these lines in the travis
|
||||
config:
|
||||
|
||||
```
|
||||
- rm $GOPATH/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery
|
||||
- rm $GOPATH/src/k8s.io/kubernetes/vendor/k8s.io/apiserver
|
||||
- rm $GOPATH/src/k8s.io/kubernetes/vendor/k8s.io/client-go
|
||||
- cp -r $GOPATH/src/k8s.io/kubernetes/vendor/* $GOPATH/src/
|
||||
- rm -rf $GOPATH/src/k8s.io/kubernetes/vendor/*
|
||||
- cp -r $GOPATH/src/k8s.io/kubernetes/staging/src/* $GOPATH/src/
|
||||
```
|
||||
Reference in New Issue
Block a user