INNER CODE UNIT · Go
TestContactPointIndexing
grafana/grafana-operator · controllers/contactpoint_controller_test.go:320
func TestContactPointIndexing(t *testing.T) {
reconciler := &GrafanaContactPointReconciler{
Client: cl,
}
t.Run("indexSecretSource returns correct secret references", func(t *testing.T) {
cp := &v1beta1.GrafanaContactPoint{
Namespace: "test-namespace",
Name: "test-contactpoint",
Spec: v1beta1.GrafanaContactPointSpec{
ValuesFrom: []v1beta1.ValueFrom{
{
ValueFrom: v1beta1.ValueFromSource{
SecretKeyRef: tk8s.GetSecretKeySelector(t, "secret1", "key1"),
},
},
{
ValueFrom: v1beta1.ValueFromSource{