daml/ledger/ledger-api-test-tool/util.bzl
tudor-da 8e31e8e6a8
[Self-service error codes] Enabled by default [DPP-691] (#11685)
* [Self-service error codes] Enabled by default
* Flag changed to `use-pre-1.18-error-codes` (disabled by default)

CHANGELOG_BEGIN
[Ledger API Specification] The Ledger API returns enriched error codes (see https://docs.daml.com/error-codes/self-service/index.html)
For backwards-compatibility, a new API flag `--use-pre-1.18-error-codes` is introduced for preserving the legacy behavior for
clients that want to migrate incrementally to the changed gRPC status code responses and error details format.
CHANGELOG_END

* Adapted HttpServiceIntegrationTest

* Renamed `Feature Flag` to `Configuration` in docs

* Fix Daml Script tests

changelog_begin
changelog_end

* Fix Repl functests

changelog_begin
changelog_end

* Fix haskell binding tests

changelog_begin
changelog_end

* Fix CommandClientIT test

* Fixed Sandbox and CommandServiceBackpressureIT tests
 Please enter the commit message for your changes. Lines starting

* Adapt //compiler/damlc/tests:repl-functests again

* Fix more tests and address Miklos' comments
* Flag name changed to `grpc-status-codes-compatibility-mode`

* Remove useless flags sandbox-classic

* Sandbox-classic tests fix for ContractKeysIT and ExceptionsIT
* Created 2 deprecated test suites that have the more generic assertions as returned
by the deprecated in-memory backend

* More fixes for CommandServiceIT
* Fixes compilation issue with the deprecated exceptionsIT class for Sandbox-classic in-memory

* Compatibility mode for old test tools

* Change flag name to `use-pre-1.18-error-codes`

* Apply suggestions from code review

Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
2021-11-22 12:26:48 +00:00

33 lines
1.2 KiB
Python

# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
load(
"//daml-lf/language:daml-lf.bzl",
"versions",
)
exceptions_suites = [
"src/main/scala/com/daml/ledger/api/testtool/suites/ExceptionsIT.scala",
"src/main/scala/com/daml/ledger/api/testtool/suites/ExceptionRaceConditionIT.scala",
# TODO sandbox-classic removal: remove the line below
"src/main/scala/com/daml/ledger/api/testtool/suites/DeprecatedSandboxClassicMemoryExceptionsIT.scala",
]
exceptions_dummy_suites = [
"src/main/scala/com/daml/ledger/api/testtool/dummy/ExceptionsIT.scala",
"src/main/scala/com/daml/ledger/api/testtool/dummy/ExceptionRaceConditionIT.scala",
# TODO sandbox-classic removal: remove the line below
"src/main/scala/com/daml/ledger/api/testtool/dummy/DeprecatedSandboxClassicMemoryExceptionsIT.scala",
]
def suites_sources(version):
suites = native.glob(
["src/main/scala/com/daml/ledger/api/testtool/suites/**/*.scala"],
exclude = exceptions_suites,
)
if versions.gte(version, "1.14"):
suites += exceptions_suites
else:
suites += exceptions_dummy_suites
return suites