1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 13:29:41 +02:00

feat(docker/kubernetes): backend docker and kubernetes dependency updates (#5861)

* client-go library update + go mod tidy

* update all k8s methods to include context

* docker/cli updated to v20.10.9 (latest)

* - removed docker/docker to docker/engine replace directive
- go mod tidy

* docker/docker updated to v20.10.9 (latest)
This commit is contained in:
zees-dev 2021-10-12 15:32:14 +13:00 committed by GitHub
parent e6d690e31e
commit 54d47ebc76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 971 additions and 177 deletions

View file

@ -1,6 +1,7 @@
package cli
import (
"context"
"testing"
portainer "github.com/portainer/portainer/api"
@ -39,11 +40,11 @@ func Test_GetServiceAccount(t *testing.T) {
Name: tokenData.Username,
},
}
_, err := k.cli.CoreV1().ServiceAccounts(portainerNamespace).Create(serviceAccount)
_, err := k.cli.CoreV1().ServiceAccounts(portainerNamespace).Create(context.Background(), serviceAccount, metav1.CreateOptions{})
if err != nil {
t.Errorf("failed to create service acount; err=%s", err)
}
defer k.cli.CoreV1().ServiceAccounts(portainerNamespace).Delete(serviceAccount.Name, nil)
defer k.cli.CoreV1().ServiceAccounts(portainerNamespace).Delete(context.Background(), serviceAccount.Name, metav1.DeleteOptions{})
sa, err := k.GetServiceAccount(tokenData)
if err != nil {
@ -72,11 +73,11 @@ func Test_GetServiceAccount(t *testing.T) {
Name: serviceAccountName,
},
}
_, err := k.cli.CoreV1().ServiceAccounts(portainerNamespace).Create(serviceAccount)
_, err := k.cli.CoreV1().ServiceAccounts(portainerNamespace).Create(context.Background(), serviceAccount, metav1.CreateOptions{})
if err != nil {
t.Errorf("failed to create service acount; err=%s", err)
}
defer k.cli.CoreV1().ServiceAccounts(portainerNamespace).Delete(serviceAccount.Name, nil)
defer k.cli.CoreV1().ServiceAccounts(portainerNamespace).Delete(context.Background(), serviceAccount.Name, metav1.DeleteOptions{})
sa, err := k.GetServiceAccount(tokenData)
if err != nil {