mirror of https://github.com/k3s-io/k3s
Fix integration test
parent
02e1a2e79d
commit
de1f94cbc7
|
@ -106,7 +106,7 @@ func startComponents(manifestURL string) (apiServerURL string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cl := client.NewOrDie(apiServer.URL, "", nil)
|
cl := client.NewOrDie(api.NewContext(), apiServer.URL, "", nil)
|
||||||
cl.PollPeriod = time.Second * 1
|
cl.PollPeriod = time.Second * 1
|
||||||
cl.Sync = true
|
cl.Sync = true
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ func main() {
|
||||||
// Wait for the synchronization threads to come up.
|
// Wait for the synchronization threads to come up.
|
||||||
time.Sleep(time.Second * 10)
|
time.Sleep(time.Second * 10)
|
||||||
|
|
||||||
kubeClient := client.NewOrDie(apiServerURL, "", nil)
|
kubeClient := client.NewOrDie(api.NewContext(), apiServerURL, "", nil)
|
||||||
|
|
||||||
// Run tests in parallel
|
// Run tests in parallel
|
||||||
testFuncs := []testFunc{
|
testFuncs := []testFunc{
|
||||||
|
|
|
@ -61,7 +61,7 @@ func TestClient(t *testing.T) {
|
||||||
for apiVersion, values := range testCases {
|
for apiVersion, values := range testCases {
|
||||||
deleteAllEtcdKeys()
|
deleteAllEtcdKeys()
|
||||||
s := httptest.NewServer(apiserver.Handle(values.Storage, values.Codec, fmt.Sprintf("/api/%s/", apiVersion), values.selfLinker))
|
s := httptest.NewServer(apiserver.Handle(values.Storage, values.Codec, fmt.Sprintf("/api/%s/", apiVersion), values.selfLinker))
|
||||||
client := client.NewOrDie(s.URL, apiVersion, nil)
|
client := client.NewOrDie(api.NewContext(), s.URL, apiVersion, nil)
|
||||||
|
|
||||||
info, err := client.ServerVersion()
|
info, err := client.ServerVersion()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue