|
| 1 | +# CustomResourceStatusST |
| 2 | + |
| 3 | +**Description:** Test suite containing Custom Resource status verification scenarios, ensuring proper status reporting for Kafka, KafkaConnect, KafkaBridge, KafkaUser, and KafkaMirrorMaker2 resources. |
| 4 | + |
| 5 | +**Before test execution steps:** |
| 6 | + |
| 7 | +| Step | Action | Result | |
| 8 | +| - | - | - | |
| 9 | +| 1. | Deploy Cluster Operator with custom configuration. | Cluster Operator is deployed with operation timeout settings. | |
| 10 | +| 2. | Deploy shared Kafka cluster with multiple listeners. | Kafka cluster is deployed and ready with plain, TLS, and external listeners. | |
| 11 | + |
| 12 | +**Labels:** |
| 13 | + |
| 14 | +* [kafka](labels/kafka.md) |
| 15 | + |
| 16 | +<hr style="border:1px solid"> |
| 17 | + |
| 18 | +## testKafkaBridgeStatus |
| 19 | + |
| 20 | +**Description:** This test verifies that KafkaBridge status is correctly reported, including observed generation updates and URL information during ready and not ready states. |
| 21 | + |
| 22 | +**Steps:** |
| 23 | + |
| 24 | +| Step | Action | Result | |
| 25 | +| - | - | - | |
| 26 | +| 1. | Deploy KafkaBridge and verify initial status. | KafkaBridge is ready with correct status information including URL. | |
| 27 | +| 2. | Modify KafkaBridge resource requests/limits to cause NotReady state. | KafkaBridge becomes NotReady due to insufficient CPU resources. | |
| 28 | +| 3. | Restore KafkaBridge resources to recover. | KafkaBridge returns to Ready state with updated observed generation. | |
| 29 | + |
| 30 | +**Labels:** |
| 31 | + |
| 32 | +* [kafka](labels/kafka.md) |
| 33 | +* [bridge](labels/bridge.md) |
| 34 | + |
| 35 | + |
| 36 | +## testKafkaConnectAndConnectorStatus |
| 37 | + |
| 38 | +**Description:** This test verifies that KafkaConnect and KafkaConnector status is correctly reported during various state transitions including Ready, NotReady, and configuration changes. |
| 39 | + |
| 40 | +**Steps:** |
| 41 | + |
| 42 | +| Step | Action | Result | |
| 43 | +| - | - | - | |
| 44 | +| 1. | Deploy KafkaConnect with file plugin and KafkaConnector. | KafkaConnect and KafkaConnector are ready with correct status information. | |
| 45 | +| 2. | Modify KafkaConnect bootstrap servers to invalid value. | KafkaConnect becomes NotReady due to invalid bootstrap configuration. | |
| 46 | +| 3. | Restore valid KafkaConnect bootstrap servers. | KafkaConnect returns to Ready state. | |
| 47 | +| 4. | Modify KafkaConnector cluster label to invalid value. | KafkaConnector becomes NotReady and connector status is not reported (i.e., null). | |
| 48 | +| 5. | Restore valid KafkaConnector cluster label. | KafkaConnector returns to Ready state. | |
| 49 | +| 6. | Modify KafkaConnector class name to invalid value. | KafkaConnector becomes NotReady due to invalid connector class. | |
| 50 | +| 7. | Restore valid KafkaConnector configuration. | KafkaConnector returns to Ready state. | |
| 51 | + |
| 52 | +**Labels:** |
| 53 | + |
| 54 | +* [kafka](labels/kafka.md) |
| 55 | +* [connect](labels/connect.md) |
| 56 | + |
| 57 | + |
| 58 | +## testKafkaConnectorWithoutClusterConfig |
| 59 | + |
| 60 | +**Description:** This test verifies that KafkaConnector without proper cluster configuration fails gracefully without causing NullPointerException (NPE) in Cluster Operator logs. |
| 61 | + |
| 62 | +**Steps:** |
| 63 | + |
| 64 | +| Step | Action | Result | |
| 65 | +| - | - | - | |
| 66 | +| 1. | Create KafkaConnector without cluster configuration in labels. | KafkaConnector is created but becomes NotReady. | |
| 67 | +| 2. | Verify connector remains in NotReady state. | KafkaConnector status shows NotReady without causing NPE in Cluster Operator logs. | |
| 68 | +| 3. | Delete the invalid KafkaConnector. | KafkaConnector is successfully deleted. | |
| 69 | + |
| 70 | +**Labels:** |
| 71 | + |
| 72 | +* [kafka](labels/kafka.md) |
| 73 | +* [connect](labels/connect.md) |
| 74 | + |
| 75 | + |
| 76 | +## testKafkaMirrorMaker2Status |
| 77 | + |
| 78 | +**Description:** This test verifies that KafkaMirrorMaker2 status is correctly reported, including observed generation updates, URL information, and connector status during Ready and NotReady states. |
| 79 | + |
| 80 | +**Steps:** |
| 81 | + |
| 82 | +| Step | Action | Result | |
| 83 | +| - | - | - | |
| 84 | +| 1. | Deploy source Kafka cluster and KafkaMirrorMaker2. | KafkaMirrorMaker2 is ready with correct status information including URL and connector states. | |
| 85 | +| 2. | Modify KafkaMirrorMaker2 resources to cause NotReady state. | KafkaMirrorMaker2 becomes NotReady due to insufficient CPU resources. | |
| 86 | +| 3. | Restore KafkaMirrorMaker2 resources to recover. | KafkaMirrorMaker2 returns to Ready state with updated observed generation. | |
| 87 | +| 4. | Verify pod stability after recovery. | KafkaMirrorMaker2 pods remain stable, with no unexpected rolling updates. | |
| 88 | + |
| 89 | +**Labels:** |
| 90 | + |
| 91 | +* [kafka](labels/kafka.md) |
| 92 | +* [mirror-maker-2](labels/mirror-maker-2.md) |
| 93 | + |
| 94 | + |
| 95 | +## testKafkaMirrorMaker2WrongBootstrap |
| 96 | + |
| 97 | +**Description:** This test verifies that KafkaMirrorMaker2 with invalid bootstrap server configuration fails gracefully and can be deleted. |
| 98 | + |
| 99 | +**Steps:** |
| 100 | + |
| 101 | +| Step | Action | Result | |
| 102 | +| - | - | - | |
| 103 | +| 1. | Create KafkaMirrorMaker2 with non-existing bootstrap servers. | KafkaMirrorMaker2 is created but becomes NotReady. | |
| 104 | +| 2. | Verify KafkaMirrorMaker2 remains in NotReady state. | KafkaMirrorMaker2 status shows NotReady due to invalid bootstrap configuration. | |
| 105 | +| 3. | Delete the KafkaMirrorMaker2 with invalid configuration. | KafkaMirrorMaker2 and its deployment are successfully deleted. | |
| 106 | + |
| 107 | +**Labels:** |
| 108 | + |
| 109 | +* [kafka](labels/kafka.md) |
| 110 | +* [mirror-maker-2](labels/mirror-maker-2.md) |
| 111 | + |
| 112 | + |
| 113 | +## testKafkaStatus |
| 114 | + |
| 115 | +**Description:** This test verifies that Kafka cluster status is correctly reported, including observed generation updates and listener status information. The test also verifies recovery from NotReady state. |
| 116 | + |
| 117 | +**Steps:** |
| 118 | + |
| 119 | +| Step | Action | Result | |
| 120 | +| - | - | - | |
| 121 | +| 1. | Verify Kafka cluster is ready and functioning. | Kafka cluster is ready and can produce/consume messages. | |
| 122 | +| 2. | Check initial Kafka status information. | Kafka status shows correct observed generation and listener details. | |
| 123 | +| 3. | Modify Kafka resources to cause NotReady state. | Kafka cluster becomes NotReady due to insufficient CPU resources. | |
| 124 | +| 4. | Restore Kafka resources to recover. | Kafka cluster returns to Ready state with updated observed generation. | |
| 125 | + |
| 126 | +**Labels:** |
| 127 | + |
| 128 | +* [kafka](labels/kafka.md) |
| 129 | + |
| 130 | + |
| 131 | +## testKafkaStatusCertificate |
| 132 | + |
| 133 | +**Description:** This test verifies that certificates reported in Kafka status match the certificates stored in the cluster CA secret. |
| 134 | + |
| 135 | +**Steps:** |
| 136 | + |
| 137 | +| Step | Action | Result | |
| 138 | +| - | - | - | |
| 139 | +| 1. | Retrieve certificates from Kafka status. | Certificates are successfully retrieved from Kafka status. | |
| 140 | +| 2. | Retrieve certificates from cluster CA secret. | Certificates are successfully retrieved from the cluster CA secret. | |
| 141 | +| 3. | Compare status and secret certificates. | Certificates from status and secret are identical. | |
| 142 | + |
| 143 | +**Labels:** |
| 144 | + |
| 145 | +* [kafka](labels/kafka.md) |
| 146 | + |
| 147 | + |
| 148 | +## testKafkaUserStatus |
| 149 | + |
| 150 | +**Description:** This test verifies that KafkaUser status is correctly reported during creation, authorization changes, and ready state transitions. |
| 151 | + |
| 152 | +**Steps:** |
| 153 | + |
| 154 | +| Step | Action | Result | |
| 155 | +| - | - | - | |
| 156 | +| 1. | Create KafkaUser with ACL authorization rules. | KafkaUser is created but not ready due to missing topic. | |
| 157 | +| 2. | Remove authorization from KafkaUser specification. | KafkaUser becomes ready after authorization removal. | |
| 158 | +| 3. | Verify KafkaUser status condition. | KafkaUser status shows Ready condition type. | |
| 159 | + |
| 160 | +**Labels:** |
| 161 | + |
| 162 | +* [kafka](labels/kafka.md) |
| 163 | + |
0 commit comments