mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
ci: use 1.22.1 ver of K8s instead of 1.20.2
Update suite_test to support kubernetes 1.21+ version Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
This commit is contained in:
parent
ef354f742e
commit
f6c3f17549
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
@ -11,7 +11,7 @@ on:
|
|||||||
env:
|
env:
|
||||||
RUNC_VERSION: v1.0.2
|
RUNC_VERSION: v1.0.2
|
||||||
GO_VERSION: 1.17.2
|
GO_VERSION: 1.17.2
|
||||||
K8S_VERSION: 1.20.2
|
K8S_VERSION: 1.22.1
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
golangci:
|
golangci:
|
||||||
|
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -10,7 +10,7 @@ pipeline {
|
|||||||
REG="cloud-native-image-registry.westus.cloudapp.azure.com/"
|
REG="cloud-native-image-registry.westus.cloudapp.azure.com/"
|
||||||
RUNC_VERSION="v1.0.2"
|
RUNC_VERSION="v1.0.2"
|
||||||
CRIO_VERSION="v1.20.0"
|
CRIO_VERSION="v1.20.0"
|
||||||
K8S_VERSION="1.20.2"
|
K8S_VERSION="1.22.1"
|
||||||
GOLANGCI_LINT_VERSION="v1.42.0"
|
GOLANGCI_LINT_VERSION="v1.42.0"
|
||||||
GO_VERSION="1.17.2"
|
GO_VERSION="1.17.2"
|
||||||
GO_TAR="go${GO_VERSION}.linux-amd64.tar.gz"
|
GO_TAR="go${GO_VERSION}.linux-amd64.tar.gz"
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
package envtest
|
package envtest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
@ -44,6 +45,8 @@ var cfg *rest.Config
|
|||||||
var k8sClient client.Client
|
var k8sClient client.Client
|
||||||
var k8sManager ctrl.Manager
|
var k8sManager ctrl.Manager
|
||||||
var testEnv *envtest.Environment
|
var testEnv *envtest.Environment
|
||||||
|
var ctx context.Context
|
||||||
|
var cancel context.CancelFunc
|
||||||
|
|
||||||
func TestAPIs(t *testing.T) {
|
func TestAPIs(t *testing.T) {
|
||||||
RegisterFailHandler(Fail)
|
RegisterFailHandler(Fail)
|
||||||
@ -54,6 +57,7 @@ func TestAPIs(t *testing.T) {
|
|||||||
|
|
||||||
var _ = BeforeSuite(func() {
|
var _ = BeforeSuite(func() {
|
||||||
logf.SetLogger(klogr.New())
|
logf.SetLogger(klogr.New())
|
||||||
|
ctx, cancel = context.WithCancel(context.TODO())
|
||||||
|
|
||||||
By("bootstrapping test environment")
|
By("bootstrapping test environment")
|
||||||
testEnv = &envtest.Environment{
|
testEnv = &envtest.Environment{
|
||||||
@ -89,7 +93,7 @@ var _ = BeforeSuite(func() {
|
|||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
err = k8sManager.Start(ctrl.SetupSignalHandler())
|
err = k8sManager.Start(ctx)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
}()
|
}()
|
||||||
|
|
||||||
@ -99,6 +103,7 @@ var _ = BeforeSuite(func() {
|
|||||||
}, 60)
|
}, 60)
|
||||||
|
|
||||||
var _ = AfterSuite(func() {
|
var _ = AfterSuite(func() {
|
||||||
|
cancel()
|
||||||
By("tearing down the test environment")
|
By("tearing down the test environment")
|
||||||
err := testEnv.Stop()
|
err := testEnv.Stop()
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
Loading…
Reference in New Issue
Block a user