Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSSM-7992: Add test SMCP log levels #731

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

unsortedhashsets
Copy link
Member

@unsortedhashsets unsortedhashsets commented Aug 21, 2024

Close-loop

Related:

2.5.1 operator fail example:

=== RUN   TestLogging
    smcp_logging_test.go:29: This test verifies allowed logging levels for the control plane
    smcp_logging_test.go:30: See https://issues.redhat.com/browse/OSSM-6331
    smcp_logging_test.go:32:    
    smcp_logging_test.go:32: STEP 1: Deploy control plane
    smcp_logging_test.go:33:    
    smcp_logging_test.go:33: STEP 2: Apply default SMCP and SMMR manifests
    smcp_logging_test.go:33:    Wait for condition condition=Ready on smcp istio-system/basic...
    smcp_logging_test.go:33:    FAILURE: Command failed: oc wait -n istio-system smcp/basic --for condition=Ready --timeout 10s
        error: timed out waiting for the condition on servicemeshcontrolplanes/basic
        error: exit status 1
    smcp_logging_test.go:33:    Wait for condition condition=Ready on smcp istio-system/basic...
    smcp_logging_test.go:33:    FAILURE: Command failed: oc wait -n istio-system smcp/basic --for condition=Ready --timeout 10s
        error: timed out waiting for the condition on servicemeshcontrolplanes/basic
        error: exit status 1
    smcp_logging_test.go:33:    Wait for condition condition=Ready on smcp istio-system/basic...
    smcp_logging_test.go:33:    SUCCESS: Condition condition=Ready met by smcp istio-system/basic
    smcp_logging_test.go:33:    Wait for smmr/default to be ready in namespace istio-system
    smcp_logging_test.go:39:    
    smcp_logging_test.go:39: STEP 3: Try to patch SMCP with unsupported log levels (trace, critical), patch should fail
    smcp_logging_test.go:40:    FAILURE: Patch succeeded unexpectedly, unsupported log levels were not rejected; expected to find the string 'Error from server (BadRequest): admission webhook "smcp.validation.maistra.io" denied the request: [istiod doesn't support 'trace' log level, istiod doesn't support 'critical' log level]' in the output, but it wasn't found; full output:
        servicemeshcontrolplane.maistra.io/basic patched
    smcp_logging_test.go:46:    
    smcp_logging_test.go:46: STEP 4: Wait SMCP ready
    smcp_logging_test.go:47:    Wait for condition condition=Ready on smcp istio-system/basic...
    smcp_logging_test.go:47:    FAILURE: Command failed: oc wait -n istio-system smcp/basic --for condition=Ready --timeout 10s
        error: timed out waiting for the condition on servicemeshcontrolplanes/basic

2.6.0 operator success

=== RUN   TestLogging
    smcp_logging_test.go:29: This test verifies allowed logging levels for the control plane
    smcp_logging_test.go:30: See https://issues.redhat.com/browse/OSSM-6331
    smcp_logging_test.go:32:    
    smcp_logging_test.go:32: STEP 1: Deploy control plane
    smcp_logging_test.go:33:    
    smcp_logging_test.go:33: STEP 2: Apply default SMCP and SMMR manifests
    smcp_logging_test.go:33:    Wait for condition condition=Ready on smcp istio-system/basic...
    smcp_logging_test.go:33:    FAILURE: Command failed: oc wait -n istio-system smcp/basic --for condition=Ready --timeout 10s
        error: timed out waiting for the condition on servicemeshcontrolplanes/basic
        error: exit status 1
    smcp_logging_test.go:33:    Wait for condition condition=Ready on smcp istio-system/basic...
    smcp_logging_test.go:33:    FAILURE: Command failed: oc wait -n istio-system smcp/basic --for condition=Ready --timeout 10s
        error: timed out waiting for the condition on servicemeshcontrolplanes/basic
        error: exit status 1
    smcp_logging_test.go:33:    Wait for condition condition=Ready on smcp istio-system/basic...
    smcp_logging_test.go:33:    SUCCESS: Condition condition=Ready met by smcp istio-system/basic
    smcp_logging_test.go:33:    Wait for smmr/default to be ready in namespace istio-system
    smcp_logging_test.go:39:    
    smcp_logging_test.go:39: STEP 3: Try to patch SMCP with unsupported log levels (trace, critical), patch should fail
    smcp_logging_test.go:40:    SUCCESS: Patch failed as expected due to unsupported log levels
    smcp_logging_test.go:46:    
    smcp_logging_test.go:46: STEP 4: Wait SMCP ready
    smcp_logging_test.go:47:    Wait for condition condition=Ready on smcp istio-system/basic...
    smcp_logging_test.go:47:    SUCCESS: Condition condition=Ready met by smcp istio-system/basic
    smcp_logging_test.go:49:    
    smcp_logging_test.go:49: STEP 5: Try to patch SMCP with supported log levels (none, error, warn, info, debug, fail)
    smcp_logging_test.go:52:    
    smcp_logging_test.go:52: STEP 6: Wait SMCP ready
    smcp_logging_test.go:53:    Wait for condition condition=Ready on smcp istio-system/basic...
    smcp_logging_test.go:53:    SUCCESS: Condition condition=Ready met by smcp istio-system/basic

@mkralik3 mkralik3 self-requested a review August 21, 2024 12:31
@unsortedhashsets
Copy link
Member Author

/retest-required

2 similar comments
@mkralik3
Copy link
Collaborator

/retest-required

@mkralik3
Copy link
Collaborator

/retest-required

@openshift-merge-bot openshift-merge-bot bot merged commit afb6cd4 into maistra:main Aug 26, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants