Skip to content

Commit

Permalink
Add Setting NATS state to Warning for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
muralov committed Nov 24, 2023
1 parent dd79b5a commit 081f69c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions testutils/integration/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,7 @@ func StartEnvTest(projectRootDir string, celValidationEnabled bool) (*envtest.En
testEnv := &envtest.Environment{
CRDDirectoryPaths: []string{
filepath.Join(projectRootDir, "config", "crd", "bases"),
filepath.Join(projectRootDir, "config", "crd", "external"),
},
ErrorIfCRDPathMissing: true,
AttachControlPlaneOutput: attachControlPlaneOutput,
Expand Down
7 changes: 7 additions & 0 deletions testutils/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ func WithNATSStateReady() NATSOption {
}
}

func WithNATSStateWarning() NATSOption {
return func(nats *v1alpha1.NATS) error {
nats.Status.State = v1alpha1.StateWarning
return nil
}
}

func WithNATSStateProcessing() NATSOption {
return func(nats *v1alpha1.NATS) error {
nats.Status.State = v1alpha1.StateProcessing
Expand Down

0 comments on commit 081f69c

Please sign in to comment.