[test] Add a consumer to the helm tests (#312)

### Motivation

The current tests only produce a message. This test adds a consumer for the produced message.

### Modifications

* Add new section to the test where we consume the produced message
This commit is contained in:
Michael Marshall 2022-10-19 21:38:42 -07:00 committed by GitHub
parent da6ce85c66
commit 2410743cdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -41,8 +41,8 @@ fi
# install pulsar chart
ci::install_pulsar_chart ${PULSAR_HOME}/${VALUES_FILE} ${extra_opts}
# test producer
ci::test_pulsar_producer
# test producer/consumer
ci::test_pulsar_producer_consumer
if [[ "x${FUNCTION}" == "xtrue" ]]; then
# install cert manager

View File

@ -163,7 +163,7 @@ function ci::install_pulsar_chart() {
# ${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bash -c 'until [ "$(curl -L http://pulsar-ci-proxy:8080/status.html)" == "OK" ]; do sleep 3; done'
}
function ci::test_pulsar_producer() {
function ci::test_pulsar_producer_consumer() {
sleep 120
${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bash -c 'until nslookup pulsar-ci-broker; do sleep 3; done'
${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bash -c 'until nslookup pulsar-ci-proxy; do sleep 3; done'
@ -173,7 +173,10 @@ function ci::test_pulsar_producer() {
${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bin/bookkeeper shell listbookies -ro
${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bin/pulsar-admin tenants create pulsar-ci
${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bin/pulsar-admin namespaces create pulsar-ci/test
${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bin/pulsar-admin topics create pulsar-ci/test/test-topic
${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bin/pulsar-admin topics create-subscription -s test pulsar-ci/test/test-topic
${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bin/pulsar-client produce -m "test-message" pulsar-ci/test/test-topic
${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bin/pulsar-client consume -s test pulsar-ci/test/test-topic
}
function ci::wait_function_running() {