Commit fc4686f
Agent
Add Kafka integration tests and deploy-kafka EaaS task
Deploy a single-node Apache Kafka 3.9.2 broker (KRaft mode) in the EaaS
ephemeral namespace alongside CTS. Three emptyDir volumes and an initContainer
satisfy OpenShift's restricted-v2 SCC. The broker is exposed as kafka:9092
(plain PLAINTEXT).
Add three integration-test helpers in test_integration_api.py:
- kafka_message_on(kafka_url, topic): context manager that snapshots the
partition-0 end offset before its body runs, then consumes the first
matching message afterwards. Ensures offset snapshot and consumption cannot
be accidentally reordered.
- import_compose / tag_compose / untag_compose now accept an optional
kafka_url parameter. When set, each helper wraps its HTTP call inside
kafka_message_on and asserts the expected Kafka event.
- test_kafka_messaging exercises all three operations in sequence.
import_compose passes a compose-ID predicate to kafka_message_on so that
stale in-flight compose-created messages from earlier tests are skipped
rather than mistakenly accepted.
Also fix a bug in cts/messaging.py: kafka-python requires Python None for
"no compression"; the string "none" raised "Not supported codec: none".
Convert the string to None before constructing KafkaProducer.
Generated-By: OpenCode (google-vertex-anthropic/claude-sonnet-4-6@default)1 parent 37bad18 commit fc4686f
4 files changed
Lines changed: 450 additions & 17 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