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

[system test] [doc] kafka package #10650

Merged
merged 12 commits into from
Oct 11, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

| Step | Action | Result |
| - | - | - |
| 1. | Set up Kafka Bridge and its configuration including CORS settings | Kafka Bridge is set up with the correct configuration |
| 2. | Deploy required Kafka resources and scraper pod | Kafka resources and scraper pod are deployed and running |
| 1. | Set up Kafka Bridge and its configuration including CORS settings. | Kafka Bridge is set up with the correct configuration. |
| 2. | Deploy required Kafka resources and scraper pod. | Kafka resources and scraper pod are deployed and running. |

**Labels:**

Expand All @@ -23,13 +23,13 @@

| Step | Action | Result |
| - | - | - |
| 1. | Create Kafka Bridge user and consumer group | Kafka Bridge user and consumer group are created successfully |
| 2. | Set up headers with forbidden origin and pre-flight HTTP OPTIONS method | Headers and method are set correctly |
| 3. | Send HTTP OPTIONS request to the Bridge | HTTP OPTIONS request is sent to the Bridge and a response is received |
| 4. | Verify the response contains '403' and 'CORS Rejected - Invalid origin' | Response indicates the CORS request is rejected |
| 5. | Remove 'Access-Control-Request-Method' from headers and set HTTP POST method | Headers are updated and HTTP method is set correctly |
| 6. | Send HTTP POST request to the Bridge | HTTP POST request is sent to the Bridge and a response is received |
| 7. | Verify the response contains '403' and 'CORS Rejected - Invalid origin' | Response indicates the CORS request is rejected |
| 1. | Create Kafka Bridge user and consumer group. | Kafka Bridge user and consumer group are created successfully. |
| 2. | Set up headers with forbidden origin and pre-flight HTTP OPTIONS method. | Headers and method are set correctly. |
| 3. | Send HTTP OPTIONS request to the Bridge. | HTTP OPTIONS request is sent to the Bridge and a response is received. |
| 4. | Verify the response contains '403' and 'CORS Rejected - Invalid origin'. | Response indicates the CORS request is rejected. |
| 5. | Remove 'Access-Control-Request-Method' from headers and set HTTP POST method. | Headers are updated and HTTP method is set correctly. |
| 6. | Send HTTP POST request to the Bridge. | HTTP POST request is sent to the Bridge and a response is received. |
| 7. | Verify the response contains '403' and 'CORS Rejected - Invalid origin'. | Response indicates the CORS request is rejected. |

**Labels:**

Expand All @@ -44,12 +44,12 @@

| Step | Action | Result |
| - | - | - |
| 1. | Set up the Kafka Bridge user and configuration | Kafka Bridge user and configuration are set up |
| 2. | Construct the request URL and headers | URL and headers are constructed properly |
| 3. | Send OPTIONS request to Kafka Bridge and capture the response | Response is captured from Bridge |
| 4. | Validate the response contains expected status codes and headers | Response has correct status codes and headers for allowed origin |
| 5. | Send GET request to Kafka Bridge and capture the response | Response is captured from Bridge for GET request |
| 6. | Check if the GET request response is '404 Not Found' | Response for GET request is 404 Not Found |
| 1. | Set up the Kafka Bridge user and configuration. | Kafka Bridge user and configuration are set up. |
| 2. | Construct the request URL and headers. | URL and headers are constructed properly. |
| 3. | Send OPTIONS request to Kafka Bridge and capture the response. | Response is captured from Bridge. |
| 4. | Validate the response contains expected status codes and headers. | Response has correct status codes and headers for allowed origin. |
| 5. | Send GET request to Kafka Bridge and capture the response. | Response is captured from Bridge for GET request. |
| 6. | Check if the GET request response is '404 Not Found'. | Response for GET request is 404 Not Found. |

**Labels:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

| Step | Action | Result |
| - | - | - |
| 1. | Initialize Test Storage and deploy Kafka and Kafka Bridge | Kafka and Kafka Bridge are deployed with necessary configuration |
| 1. | Initialize Test Storage and deploy Kafka and Kafka Bridge. | Kafka and Kafka Bridge are deployed with necessary configuration. |

**Labels:**

Expand Down Expand Up @@ -42,12 +42,12 @@

| Step | Action | Result |
| - | - | - |
| 1. | Create a Kafka Bridge resource with initial configuration | Kafka Bridge is created and deployed with the specified initial configuration |
| 2. | Remove an environment variable that is in use | Environment variable TEST_ENV_1 is removed from the initial configuration |
| 3. | Verify initial probe values and environment variables | The probe values and environment variables match the initial configuration |
| 4. | Update Kafka Bridge resource with new configuration | Kafka Bridge is updated and redeployed with the new configuration |
| 5. | Verify updated probe values and environment variables | The probe values and environment variables match the updated configuration |
| 6. | Verify Kafka Bridge configurations for producer and consumer | Producer and consumer configurations match the updated settings |
| 1. | Create a Kafka Bridge resource with initial configuration. | Kafka Bridge is created and deployed with the specified initial configuration. |
| 2. | Remove an environment variable that is in use. | Environment variable TEST_ENV_1 is removed from the initial configuration. |
| 3. | Verify initial probe values and environment variables. | The probe values and environment variables match the initial configuration. |
| 4. | Update Kafka Bridge resource with new configuration. | Kafka Bridge is updated and redeployed with the new configuration. |
| 5. | Verify updated probe values and environment variables. | The probe values and environment variables match the updated configuration. |
| 6. | Verify Kafka Bridge configurations for producer and consumer. | Producer and consumer configurations match the updated settings. |

**Labels:**

Expand Down Expand Up @@ -81,10 +81,10 @@

| Step | Action | Result |
| - | - | - |
| 1. | Retrieve the Kafka Bridge service using kubeClient | Kafka Bridge service instance is obtained |
| 2. | Extract the discovery annotation from the service metadata | The discovery annotation is retrieved as a string |
| 3. | Convert the discovery annotation to a JsonArray | JsonArray representation of the discovery annotation is created |
| 4. | Validate the content of the JsonArray against expected values | The JsonArray matches the expected service discovery information |
| 1. | Retrieve the Kafka Bridge service using kubeClient. | Kafka Bridge service instance is obtained. |
| 2. | Extract the discovery annotation from the service metadata. | The discovery annotation is retrieved as a string. |
| 3. | Convert the discovery annotation to a JsonArray. | JsonArray representation of the discovery annotation is created. |
| 4. | Validate the content of the JsonArray against expected values. | The JsonArray matches the expected service discovery information. |

**Labels:**

Expand All @@ -100,11 +100,11 @@

| Step | Action | Result |
| - | - | - |
| 1. | Initialize the test storage | TestStorage instance is initialized |
| 2. | Create Kafka topic resource | Kafka topic resource is created with specified configurations |
| 3. | Setup and deploy Kafka Bridge consumer client | Kafka Bridge consumer client is set up and started receiving messages |
| 4. | Send messages using Kafka producer | Messages are sent to Kafka successfully |
| 5. | Verify message reception | All messages are received by Kafka Bridge consumer client |
| 1. | Initialize the test storage. | TestStorage instance is initialized. |
| 2. | Create Kafka topic resource. | Kafka topic resource is created with specified configurations. |
| 3. | Setup and deploy Kafka Bridge consumer client. | Kafka Bridge consumer client is set up and started receiving messages. |
| 4. | Send messages using Kafka producer. | Messages are sent to Kafka successfully. |
| 5. | Verify message reception. | All messages are received by Kafka Bridge consumer client. |

**Labels:**

Expand Down Expand Up @@ -137,10 +137,10 @@

| Step | Action | Result |
| - | - | - |
| 1. | Create a KafkaBridge resource and wait for it to be ready | KafkaBridge resource is created and ready with 1 replica |
| 2. | Fetch the current number of KafkaBridge pods | There should be exactly 1 KafkaBridge pod initially |
| 3. | Scale KafkaBridge to zero replicas | Scaling action is acknowledged |
| 4. | Wait for KafkaBridge to scale down to zero replicas | KafkaBridge scales down to zero replicas correctly |
| 1. | Create a KafkaBridge resource and wait for it to be ready. | KafkaBridge resource is created and ready with 1 replica. |
| 2. | Fetch the current number of KafkaBridge pods. | There should be exactly 1 KafkaBridge pod initially. |
| 3. | Scale KafkaBridge to zero replicas. | Scaling action is acknowledged. |
| 4. | Wait for KafkaBridge to scale down to zero replicas. | KafkaBridge scales down to zero replicas correctly. |
| 5. | Check the number of KafkaBridge pods after scaling | No KafkaBridge pods should be running |
| 6. | Verify the status of KafkaBridge | KafkaBridge status should indicate it is ready with zero replicas |

Expand All @@ -157,15 +157,15 @@

| Step | Action | Result |
| - | - | - |
| 1. | Initialize test storage | Test storage is initialized with necessary context |
| 2. | Create a Kafka Bridge client job | Kafka Bridge client job is configured and instantiated |
| 3. | Create Kafka topic | Kafka topic is successfully created |
| 4. | Start Kafka Bridge producer | Kafka Bridge producer successfully begins sending messages |
| 5. | Wait for producer success | All messages are sent successfully |
| 6. | Start Kafka consumer | Kafka consumer is instantiated and starts consuming messages |
| 7. | Wait for consumer success | All messages are consumed successfully |
| 8. | Verify Kafka Bridge pod labels | Labels for Kafka Bridge pods are correctly set and verified |
| 9. | Verify Kafka Bridge service labels | Labels for Kafka Bridge service are correctly set and verified |
| 1. | Initialize test storage. | Test storage is initialized with necessary context. |
| 2. | Create a Kafka Bridge client job. | Kafka Bridge client job is configured and instantiated. |
| 3. | Create Kafka topic. | Kafka topic is successfully created. |
| 4. | Start Kafka Bridge producer. | Kafka Bridge producer successfully begins sending messages. |
| 5. | Wait for producer success. | All messages are sent successfully. |
| 6. | Start Kafka consumer. | Kafka consumer is instantiated and starts consuming messages. |
| 7. | Wait for consumer success. | All messages are consumed successfully. |
| 8. | Verify Kafka Bridge pod labels. | Labels for Kafka Bridge pods are correctly set and verified. |
| 9. | Verify Kafka Bridge service labels. | Labels for Kafka Bridge service are correctly set and verified. |

**Labels:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

| Step | Action | Result |
| - | - | - |
| 1. | Create TestStorage instance | TestStorage instance is created |
| 2. | Create BridgeClients instance | BridgeClients instance is created |
| 3. | Deploy Kafka and KafkaBridge | Kafka and KafkaBridge are deployed successfully |
| 4. | Create Kafka topic | Kafka topic is created with the given configuration |
| 5. | Create Kafka user with SCRAM-SHA authentication | Kafka user is created and configured with SCRAM-SHA authentication |
| 6. | Deploy HTTP bridge | HTTP bridge is deployed |
| 1. | Create TestStorage instance. | TestStorage instance is created. |
| 2. | Create BridgeClients instance. | BridgeClients instance is created. |
| 3. | Deploy Kafka and KafkaBridge. | Kafka and KafkaBridge are deployed successfully. |
| 4. | Create Kafka topic. | Kafka topic is created with the given configuration. |
| 5. | Create Kafka user with SCRAM-SHA authentication. | Kafka user is created and configured with SCRAM-SHA authentication. |
| 6. | Deploy HTTP bridge. | HTTP bridge is deployed. |

**Labels:**

Expand All @@ -27,11 +27,11 @@

| Step | Action | Result |
| - | - | - |
| 1. | Initialize TestStorage and BridgeClientsBuilder instances | Instances are successfully initialized |
| 2. | Create Kafka topic using ResourceManager | Kafka topic is created and available |
| 3. | Create Bridge consumer using ResourceManager | Bridge consumer is successfully created |
| 4. | Send messages to Kafka using KafkaClients | Messages are successfully sent to the Kafka topic |
| 5. | Wait for clients' success validation | Messages are successfully consumed from the Kafka topic |
| 1. | Initialize TestStorage and BridgeClientsBuilder instances. | Instances are successfully initialized. |
| 2. | Create Kafka topic using ResourceManager. | Kafka topic is created and available. |
| 3. | Create Bridge consumer using ResourceManager. | Bridge consumer is successfully created. |
| 4. | Send messages to Kafka using KafkaClients. | Messages are successfully sent to the Kafka topic. |
| 5. | Wait for clients' success validation. | Messages are successfully consumed from the Kafka topic. |

**Labels:**

Expand All @@ -46,13 +46,13 @@

| Step | Action | Result |
| - | - | - |
| 1. | Create TestStorage and BridgeClients objects | Instances of TestStorage and BridgeClients are created |
| 2. | Create topic using the resource manager | Topic is created successfully with the specified configuration |
| 3. | Start producing messages via Kafka Bridge | Messages are produced successfully to the topic |
| 4. | Wait for producer success | Producer finishes sending messages without errors |
| 5. | Create KafkaClients and configure with TLS and SCRAM-SHA | Kafka client is configured with appropriate security settings |
| 6. | Start consuming messages via Kafka client | Messages are consumed successfully from the topic |
| 7. | Wait for consumer success | Consumer finishes receiving messages without errors |
| 1. | Create TestStorage and BridgeClients objects. | Instances of TestStorage and BridgeClients are created. |
| 2. | Create topic using the resource manager. | Topic is created successfully with the specified configuration. |
| 3. | Start producing messages via Kafka Bridge. | Messages are produced successfully to the topic. |
| 4. | Wait for producer success. | Producer finishes sending messages without errors. |
| 5. | Create KafkaClients and configure with TLS and SCRAM-SHA. | Kafka client is configured with appropriate security settings. |
| 6. | Start consuming messages via Kafka client. | Messages are consumed successfully from the topic. |
| 7. | Wait for consumer success. | Consumer finishes receiving messages without errors. |

**Labels:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

| Step | Action | Result |
| - | - | - |
| 1. | Initialize test storage and context | Test storage and context are initialized successfully |
| 2. | Deploy Kafka and KafkaBridge | Kafka and KafkaBridge are deployed and running |
| 3. | Create Kafka user with TLS configuration | Kafka user with TLS configuration is created |
| 4. | Deploy HTTP bridge with TLS configuration | HTTP bridge is deployed with TLS configuration |
| 1. | Initialize test storage and context. | Test storage and context are initialized successfully. |
| 2. | Deploy Kafka and KafkaBridge. | Kafka and KafkaBridge are deployed and running. |
| 3. | Create Kafka user with TLS configuration. | Kafka user with TLS configuration is created. |
| 4. | Deploy HTTP bridge with TLS configuration. | HTTP bridge is deployed with TLS configuration. |

**Labels:**

Expand All @@ -25,13 +25,13 @@

| Step | Action | Result |
| - | - | - |
| 1. | Initialize the test storage instance | TestStorage object is instantiated with the test context. |
| 2. | Configure Kafka Bridge client for consumption | Kafka Bridge client is configured with topic and consumer names. |
| 3. | Create Kafka topic with provided configurations | Kafka topic resource is created and available. |
| 4. | Deploy the Kafka Bridge consumer | Kafka Bridge consumer starts successfully and is ready to consume messages. |
| 5. | Initialize TLS Kafka client for message production | TLS Kafka client is configured and initialized. |
| 6. | Deploy the Kafka producer TLS client | TLS Kafka producer client starts successfully and begins sending messages. |
| 7. | Verify message consumption | Messages are successfully consumed by the Kafka Bridge consumer. |
| 1. | Initialize the test storage instance. | TestStorage object is instantiated with the test context. |
| 2. | Configure Kafka Bridge client for consumption. | Kafka Bridge client is configured with topic and consumer names. |
| 3. | Create Kafka topic with provided configurations. | Kafka topic resource is created and available. |
| 4. | Deploy the Kafka Bridge consumer. | Kafka Bridge consumer starts successfully and is ready to consume messages. |
| 5. | Initialize TLS Kafka client for message production. | TLS Kafka client is configured and initialized. |
| 6. | Deploy the Kafka producer TLS client. | TLS Kafka producer client starts successfully and begins sending messages. |
| 7. | Verify message consumption. | Messages are successfully consumed by the Kafka Bridge consumer. |

**Labels:**

Expand All @@ -46,12 +46,12 @@

| Step | Action | Result |
| - | - | - |
| 1. | Initialize TestStorage and BridgeClients with TLS configuration | TestStorage and BridgeClients are initialized with TLS configuration |
| 2. | Create Kafka topic using resource manager | Kafka topic is successfully created |
| 3. | Create Kafka Bridge Client job for producing messages | Kafka Bridge Client job is created and produces messages successfully |
| 4. | Verify that the producer successfully sends messages | Producer successfully sends the expected number of messages |
| 5. | Create Kafka client consumer with TLS configuration | Kafka client consumer is created with TLS configuration |
| 6. | Verify that the consumer successfully receives messages | Consumer successfully receives the expected number of messages |
| 1. | Initialize TestStorage and BridgeClients with TLS configuration. | TestStorage and BridgeClients are initialized with TLS configuration. |
| 2. | Create Kafka topic using resource manager. | Kafka topic is successfully created. |
| 3. | Create Kafka Bridge Client job for producing messages. | Kafka Bridge Client job is created and produces messages successfully. |
| 4. | Verify that the producer successfully sends messages. | Producer successfully sends the expected number of messages. |
| 5. | Create Kafka client consumer with TLS configuration. | Kafka client consumer is created with TLS configuration. |
| 6. | Verify that the consumer successfully receives messages. | Consumer successfully receives the expected number of messages. |

**Labels:**

Expand Down
Loading
Loading