constellation/operators/constellation-node-operator/controllers/schemes_test.go
Malte Poll 77216f7492
deps: vendor node-maintenance-operator api (#1172)
* deps: go generate script to vendor node-maintenance-operator api folder

* deps: vendor node-maintenance-operator api folder

* operators: use vendored node-maintenance-operator api

* ci: ignore 3rdparty dir for license check
2023-02-14 18:46:48 +01:00

27 lines
752 B
Go

/*
Copyright (c) Edgeless Systems GmbH
SPDX-License-Identifier: AGPL-3.0-only
*/
package controllers
import (
"testing"
"k8s.io/apimachinery/pkg/runtime"
nodemaintenancev1beta1 "github.com/edgelesssys/constellation/v2/3rdparty/node-maintenance-operator/api/v1beta1"
updatev1alpha1 "github.com/edgelesssys/constellation/v2/operators/constellation-node-operator/v2/api/v1alpha1"
"github.com/stretchr/testify/require"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
)
func getScheme(t *testing.T) *runtime.Scheme {
scheme := runtime.NewScheme()
require.NoError(t, clientgoscheme.AddToScheme(scheme))
require.NoError(t, updatev1alpha1.AddToScheme(scheme))
require.NoError(t, nodemaintenancev1beta1.AddToScheme(scheme))
return scheme
}