2022-09-05 03:06:08 -04:00
|
|
|
/*
|
|
|
|
Copyright (c) Edgeless Systems GmbH
|
|
|
|
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2022-06-29 03:43:10 -04:00
|
|
|
package controllers
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"k8s.io/apimachinery/pkg/runtime"
|
|
|
|
|
2023-01-04 13:04:28 -05:00
|
|
|
updatev1alpha1 "github.com/edgelesssys/constellation/v2/operators/constellation-node-operator/v2/api/v1alpha1"
|
2022-06-29 03:43:10 -04:00
|
|
|
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
|
|
|
|
}
|