Skip to content

Commit

Permalink
Moves all unit tests under operator/manifests to the manifests package (
Browse files Browse the repository at this point in the history
#9433)

Signed-off-by: Joao Marcal <[email protected]>
  • Loading branch information
JoaoBraveCoding authored May 10, 2023
1 parent 978606b commit d7dd2e9
Show file tree
Hide file tree
Showing 9 changed files with 154 additions and 164 deletions.
9 changes: 4 additions & 5 deletions operator/internal/manifests/compactor_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package manifests_test
package manifests

import (
"testing"

lokiv1 "github.com/grafana/loki/operator/apis/loki/v1"
"github.com/grafana/loki/operator/internal/manifests"
"github.com/stretchr/testify/require"
)

Expand All @@ -15,7 +14,7 @@ func TestNewCompactorStatefulSet_SelectorMatchesLabels(t *testing.T) {
// failing to specify a matching Pod Selector will result in a validation error
// during StatefulSet creation.
// See https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-selector
sts := manifests.NewCompactorStatefulSet(manifests.Options{
sts := NewCompactorStatefulSet(Options{
Name: "abcd",
Namespace: "efgh",
Stack: lokiv1.LokiStackSpec{
Expand All @@ -36,7 +35,7 @@ func TestNewCompactorStatefulSet_SelectorMatchesLabels(t *testing.T) {
}

func TestNewCompactorStatefulSet_HasTemplateConfigHashAnnotation(t *testing.T) {
ss := manifests.NewCompactorStatefulSet(manifests.Options{
ss := NewCompactorStatefulSet(Options{
Name: "abcd",
Namespace: "efgh",
ConfigSHA1: "deadbeef",
Expand All @@ -56,7 +55,7 @@ func TestNewCompactorStatefulSet_HasTemplateConfigHashAnnotation(t *testing.T) {
}

func TestNewCompactorStatefulSet_HasTemplateCertRotationRequiredAtAnnotation(t *testing.T) {
ss := manifests.NewCompactorStatefulSet(manifests.Options{
ss := NewCompactorStatefulSet(Options{
Name: "abcd",
Namespace: "efgh",
CertRotationRequiredAt: "deadbeef",
Expand Down
Loading

0 comments on commit d7dd2e9

Please sign in to comment.