(c: Composition, parser: WorkflowArgumentParser)
| 51 | |
| 52 | |
| 53 | def workflow_default(c: Composition, parser: WorkflowArgumentParser) -> None: |
| 54 | c.down(destroy_volumes=True) |
| 55 | |
| 56 | test = VersionConsistencyTest() |
| 57 | |
| 58 | parser.add_argument( |
| 59 | "--evaluation-strategy", |
| 60 | default=EVALUATION_STRATEGY_NAME_DFR, |
| 61 | type=str, |
| 62 | choices=INTERNAL_EVALUATION_STRATEGY_NAMES, |
| 63 | ) |
| 64 | |
| 65 | parser.add_argument( |
| 66 | "--other-tag", |
| 67 | type=str, |
| 68 | default="common-ancestor", |
| 69 | ) |
| 70 | |
| 71 | parser.add_argument( |
| 72 | "--allow-same-version-comparison", |
| 73 | action=argparse.BooleanOptionalAction, |
| 74 | default=False, |
| 75 | ) |
| 76 | |
| 77 | parser.add_argument( |
| 78 | "--query-output-mode", |
| 79 | type=lambda mode: QueryOutputMode[mode.upper()], |
| 80 | choices=QUERY_OUTPUT_MODE_CHOICES, |
| 81 | default=QueryOutputMode.SELECT, |
| 82 | ) |
| 83 | |
| 84 | args = test.parse_output_consistency_input_args(parser) |
| 85 | |
| 86 | port_mz_default_internal, port_mz_system_internal = 6875, 6877 |
| 87 | port_mz_default_this, port_mz_system_this = 6875, 6877 |
| 88 | port_mz_default_other, port_mz_system_other = 16875, 16877 |
| 89 | tag_mz_other = resolve_tag(args.other_tag) |
| 90 | |
| 91 | print(f"Using {tag_mz_other} as tag for other mz version") |
| 92 | |
| 93 | with c.override( |
| 94 | Materialized( |
| 95 | name="mz_this", |
| 96 | image=None, |
| 97 | ports=[ |
| 98 | f"{port_mz_default_this}:{port_mz_default_internal}", |
| 99 | f"{port_mz_system_this}:{port_mz_system_internal}", |
| 100 | ], |
| 101 | use_default_volumes=False, |
| 102 | ), |
| 103 | Materialized( |
| 104 | name="mz_other", |
| 105 | image=f"{image_registry()}/materialized:{tag_mz_other}", |
| 106 | ports=[ |
| 107 | f"{port_mz_default_other}:{port_mz_default_internal}", |
| 108 | f"{port_mz_system_other}:{port_mz_system_internal}", |
| 109 | ], |
| 110 | use_default_volumes=False, |
nothing calls this directly
no test coverage detected