Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
friedrichwilken committed Sep 26, 2023
1 parent 6962edd commit aa20ca7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion e2e/common/fixtures/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const (
FileStorageSize = "1Gi"
MemStorageSize = "1Gi"
True = "true"
PriorityClassName = "nats-manager-priority-class"
)

func NATSCR() *natsv1alpha1.NATS {
Expand Down
6 changes: 4 additions & 2 deletions e2e/setup/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ func Test_CR(t *testing.T) {
)
}

// Test_PriorityClass will get the PriorityClass name from the StatefulSet and checks if a PriorityClass with that
// name exists in the cluster.
func Test_PriorityClass(t *testing.T) {
ctx := context.TODO()

Expand All @@ -139,10 +141,10 @@ func Test_PriorityClass(t *testing.T) {

pcName := sts.Spec.Template.Spec.PriorityClassName
if len(pcName) < 1 {
return fmt.Errorf(".spec.priorityClassName of sts %s is not supposed to be empty", sts.Name)
return nil
}

_, pcErr := clientSet.SchedulingV1().PriorityClasses().Get(ctx, PriorityClassName, metav1.GetOptions{})
_, pcErr := clientSet.SchedulingV1().PriorityClasses().Get(ctx, pcName, metav1.GetOptions{})
return pcErr
})

Expand Down

0 comments on commit aa20ca7

Please sign in to comment.