mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 10:46:11 +03:00
9e6d6f7cf0
Note that these tests are switched off for now until Robert has implemented the migration. To avoid having to stuff too much in one PR the plan is to merge this one first and then switch the flag once the migrations work. changelog_begin changelog_end
35 lines
1.3 KiB
Python
35 lines
1.3 KiB
Python
# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
def migration_test(name, versions, tags, **kwargs):
|
|
native.sh_test(
|
|
name = name,
|
|
srcs = ["//sandbox-migration:test.sh"],
|
|
deps = ["@bazel_tools//tools/bash/runfiles"],
|
|
data = [
|
|
"//sandbox-migration:sandbox-migration-runner",
|
|
"//sandbox-migration:migration-model.dar",
|
|
"//sandbox-migration:migration-step",
|
|
] + ["@daml-sdk-{}//:daml".format(ver) for ver in versions],
|
|
args = versions,
|
|
tags = tags,
|
|
**kwargs
|
|
)
|
|
|
|
# TODO (MK) Remove once the append-only schema is the default.
|
|
native.sh_test(
|
|
name = "{}-append-only".format(name),
|
|
srcs = ["//sandbox-migration:test.sh"],
|
|
deps = ["@bazel_tools//tools/bash/runfiles"],
|
|
tags = [
|
|
"manual", # Manual until data migration is implemented
|
|
] + tags,
|
|
data = [
|
|
"//sandbox-migration:sandbox-migration-runner",
|
|
"//sandbox-migration:migration-model.dar",
|
|
"//sandbox-migration:migration-step",
|
|
] + ["@daml-sdk-{}//:daml".format(ver) for ver in versions],
|
|
args = ["--append-only"] + versions,
|
|
**kwargs
|
|
)
|