# Copyright Materialize, Inc. and contributors. All rights reserved. # # Use of this software is governed by the Business Source License # included in the LICENSE file at the root of this repository. # # As of the Change Date specified in that file, in accordance with # the Business Source License, use of this software will be governed # by the Apache License, Version 2.0. $ set-arg-default default-storage-size=1 # Test expected population of mz_audit_events after some DDL statements. $ set-regex match=u\d+ replacement= $ kafka-create-topic topic=test > CREATE CONNECTION kafka_conn TO KAFKA (BROKER '${testdrive.kafka-addr}', SECURITY PROTOCOL PLAINTEXT); > CREATE CLUSTER audit_log_kafka_src SIZE = '${arg.default-storage-size}'; > CREATE SOURCE kafka_src IN CLUSTER audit_log_kafka_src FROM KAFKA CONNECTION kafka_conn (TOPIC 'testdrive-test-${testdrive.seed}'); > CREATE TABLE kafka_src_tbl FROM SOURCE kafka_src (REFERENCE "testdrive-test-${testdrive.seed}") FORMAT CSV WITH 2 COLUMNS; > SELECT event_type, object_type, details - 'replica_id' - 'billed_as' - 'internal', user FROM mz_audit_events ORDER BY id DESC LIMIT 4 create source "{\"cluster_id\":\"\",\"database\":\"materialize\",\"id\":\"\",\"item\":\"kafka_src\",\"schema\":\"public\",\"type\":\"kafka\"}" materialize create source "{\"cluster_id\":null,\"database\":\"materialize\",\"id\":\"\",\"item\":\"kafka_src_progress\",\"schema\":\"public\",\"type\":\"progress\"}" materialize create cluster-replica "{\"cluster_id\":\"\",\"cluster_name\":\"audit_log_kafka_src\",\"disk\":true,\"logical_size\":\"${arg.default-storage-size}\",\"reason\":\"manual\",\"replica_name\":\"r1\"}" materialize create table "{\"database\":\"materialize\",\"id\":\"\",\"item\":\"kafka_src_tbl\",\"schema\":\"public\"}" materialize > CREATE CLUSTER audit_log_counter_src SIZE = '${arg.default-storage-size}'; > CREATE SOURCE counter_src IN CLUSTER audit_log_counter_src FROM LOAD GENERATOR COUNTER (UP TO 100); > SELECT event_type, object_type, details - 'replica_id' - 'billed_as' - 'internal', user FROM mz_audit_events ORDER BY id DESC LIMIT 4 create source "{\"cluster_id\":\"\",\"database\":\"materialize\",\"id\":\"\",\"item\":\"counter_src\",\"schema\":\"public\",\"type\":\"load-generator\"}" materialize create source "{\"cluster_id\":null,\"database\":\"materialize\",\"id\":\"\",\"item\":\"counter_src_progress\",\"schema\":\"public\",\"type\":\"progress\"}" materialize create cluster-replica "{\"cluster_id\":\"\",\"cluster_name\":\"audit_log_counter_src\",\"disk\":true,\"logical_size\":\"${arg.default-storage-size}\",\"reason\":\"manual\",\"replica_name\":\"r1\"}" materialize create cluster "{\"id\":\"\",\"name\":\"audit_log_counter_src\"}" materialize