Commit fdbaf8f
Agent
Add Kafka integration tests and deploy-kafka EaaS task
Deploys a single-node Apache Kafka 3.9.2 broker (KRaft mode) in the
EaaS ephemeral namespace and adds Kafka message assertions to the
existing workflow integration tests.
Pipeline changes (.tekton/integration-test-eaas.yaml):
- Add deploy-kafka task that starts apache/kafka:3.9.2 in KRaft mode.
Three emptyDir volumes (kafka-config, kafka-logs, kafka-gc-logs) and
an initContainer (copy-kafka-config) satisfy OpenShift restricted-v2
SCC. KAFKA_CONTROLLER_QUORUM_VOTERS uses localhost:9093 to avoid the
bootstrap deadlock. deploy-cts lists deploy-kafka in runAfter.
- Pass KAFKA_URL=kafka:9092 and install kafka-python in run-tests.
Test changes (tests/test_integration_api.py):
- kafka_url module fixture reads KAFKA_URL; returns None (not skip)
when unset so all existing workflow tests always run.
- kafka_message_on(kafka_url, topic) context manager snapshots the
partition-0 end offset before its body, then consumes the first
message at or after that offset after the body completes. No
predicates: every received message is returned as-is and asserted
by the caller, so unexpected messages cause test failures.
- kafka_messages_on(kafka_url, topic, count) batch variant for
scenarios that perform N actions on the same topic.
- import_compose, tag_compose, untag_compose each accept an optional
kafka_url parameter; when set, wraps the HTTP call in the context
manager and asserts the event name and compose_info reference.
- test_workflow_compose_import, test_workflow_respin_increment,
test_workflow_full_lifecycle all pass kafka_url to the helpers so
Kafka assertions run as part of the existing scenarios (not as a
separate test). The respin test uses kafka_messages_on to capture
all three compose-created messages in one batch.
Bug fix (cts/messaging.py):
- Convert the string "none" to Python None for compression_type so
KafkaProducer does not reject the value with "Not supported codec".
Generated-By: OpenCode (google-vertex-anthropic/claude-sonnet-4-6@default)1 parent 37bad18 commit fdbaf8f
4 files changed
Lines changed: 490 additions & 45 deletions
File tree
- .tekton
- cts
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
460 | 599 | | |
461 | 600 | | |
462 | 601 | | |
| |||
597 | 736 | | |
598 | 737 | | |
599 | 738 | | |
| 739 | + | |
600 | 740 | | |
601 | 741 | | |
602 | 742 | | |
| |||
643 | 783 | | |
644 | 784 | | |
645 | 785 | | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
646 | 794 | | |
647 | 795 | | |
648 | 796 | | |
| |||
916 | 1064 | | |
917 | 1065 | | |
918 | 1066 | | |
919 | | - | |
| 1067 | + | |
920 | 1068 | | |
921 | | - | |
| 1069 | + | |
922 | 1070 | | |
923 | 1071 | | |
924 | 1072 | | |
| |||
930 | 1078 | | |
931 | 1079 | | |
932 | 1080 | | |
933 | | - | |
| 1081 | + | |
934 | 1082 | | |
935 | 1083 | | |
936 | 1084 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
105 | 111 | | |
106 | 112 | | |
107 | | - | |
| 113 | + | |
108 | 114 | | |
109 | 115 | | |
110 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
0 commit comments