mzcompose.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. """
  10. Native Yugabyte source tests, functional.
  11. """
  12. import random
  13. from materialize.mzcompose.composition import Composition
  14. from materialize.mzcompose.services.materialized import Materialized
  15. from materialize.mzcompose.services.testdrive import Testdrive
  16. from materialize.mzcompose.services.yugabyte import Yugabyte
  17. SERVICES = [
  18. Yugabyte(),
  19. Materialized(),
  20. Testdrive(),
  21. ]
  22. #
  23. # Test that Yugabyte ingestion works
  24. #
  25. def workflow_default(c: Composition) -> None:
  26. c.up("yugabyte", "materialized")
  27. seed = random.getrandbits(16)
  28. c.run_testdrive_files(
  29. "--no-reset",
  30. "--max-errors=1",
  31. f"--seed={seed}",
  32. f"--var=default-replica-size={Materialized.Size.DEFAULT_SIZE}-{Materialized.Size.DEFAULT_SIZE}",
  33. "yugabyte-cdc.td",
  34. )