constellation/operators/constellation-node-operator/controllers/schemes_test.go
Thomas Tendyck bd63aa3c6b add license headers
sed -i '1i/*\nCopyright (c) Edgeless Systems GmbH\n\nSPDX-License-Identifier: AGPL-3.0-only\n*/\n' `grep -rL --include='*.go' 'DO NOT EDIT'`
gofumpt -w .
2022-09-05 09:17:25 +02:00

27 lines
716 B
Go

/*
Copyright (c) Edgeless Systems GmbH
SPDX-License-Identifier: AGPL-3.0-only
*/
package controllers
import (
"testing"
"k8s.io/apimachinery/pkg/runtime"
updatev1alpha1 "github.com/edgelesssys/constellation/operators/constellation-node-operator/api/v1alpha1"
nodemaintenancev1beta1 "github.com/medik8s/node-maintenance-operator/api/v1beta1"
"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
}