daml/ledger/sandbox/BUILD.bazel

307 lines
9.0 KiB
Python
Raw Normal View History

2019-08-13 19:23:03 +03:00
# Copyright (c) 2019 The DAML Authors. All rights reserved.
2019-04-04 11:33:38 +03:00
# SPDX-License-Identifier: Apache-2.0
load(
"//bazel_tools:scala.bzl",
"da_scala_binary",
"da_scala_library",
"da_scala_test_suite",
2019-04-04 11:33:38 +03:00
)
load(
"//rules_daml:daml.bzl",
"daml_compile",
2019-04-04 11:33:38 +03:00
)
load("//bazel_tools:pom_file.bzl", "pom_file")
load(
"//ledger/ledger-api-test-tool:conformance.bzl",
"conformance_test",
)
2019-04-04 11:33:38 +03:00
compileDependencies = [
# grpc_services has to come first other as somehow a different instance of grpc-core.jar
"@maven//:io_grpc_grpc_services",
"@maven//:ch_qos_logback_logback_classic",
"//daml-lf/scenario-interpreter",
"//daml-lf/transaction",
"//daml-lf/engine",
"//daml-lf/data",
"//daml-lf/language",
"//daml-lf/archive:daml_lf_dev_archive_java_proto",
"//daml-lf/archive:daml_lf_archive_reader",
"//daml-lf/interpreter",
"//daml-lf/transaction/src/main/protobuf:value_java_proto",
"//daml-lf/transaction/src/main/protobuf:transaction_java_proto",
"//ledger-api/rs-grpc-bridge",
"//ledger-api/rs-grpc-akka",
"//ledger/ledger-api-akka",
"//ledger/ledger-api-scala-logging",
"//language-support/scala/bindings",
"//ledger/ledger-api-domain:ledger-api-domain",
"//ledger/ledger-api-common:ledger-api-common",
"//ledger/ledger-api-client:ledger-api-client",
"//ledger/participant-state",
"//ledger/participant-state-index:participant-state-index",
"@maven//:ch_qos_logback_logback_core",
"@maven//:com_typesafe_scala_logging_scala_logging_2_12",
"@maven//:org_slf4j_slf4j_api",
"@maven//:org_scalaz_scalaz_core_2_12",
"@maven//:org_scalaz_scalaz_concurrent_2_12",
"@maven//:io_netty_netty_codec_http2",
"@maven//:io_netty_netty_tcnative_boringssl_static",
"@maven//:io_grpc_grpc_netty",
"@maven//:io_netty_netty_common",
"@maven//:io_netty_netty_transport",
"@maven//:io_netty_netty_handler",
"@maven//:com_github_scopt_scopt_2_12",
"@maven//:com_typesafe_akka_akka_stream_2_12",
"@maven//:com_typesafe_akka_akka_actor_2_12",
"@maven//:com_google_guava_guava",
"@maven//:org_postgresql_postgresql",
"@maven//:com_h2database_h2",
"@maven//:com_zaxxer_HikariCP",
"@maven//:org_flywaydb_flyway_core",
"@maven//:com_typesafe_play_anorm_2_12",
"@maven//:com_typesafe_play_anorm_akka_2_12",
"@maven//:com_typesafe_play_anorm_tokenizer_2_12",
"@maven//:io_dropwizard_metrics_metrics_core",
"@maven//:io_dropwizard_metrics_metrics_jmx",
"@maven//:io_zipkin_brave_brave",
"@maven//:org_scala_lang_modules_scala_java8_compat_2_12",
2019-04-04 11:33:38 +03:00
]
da_scala_library(
name = "sandbox",
srcs = glob(["src/main/scala/**/*.scala"]),
resources =
glob(
["src/main/resources/**/*"],
# Do not include logback.xml into the library: let the user
# of the sandbox-as-a-library decide how to log.
exclude = ["src/main/resources/logback.xml"],
) + [
"//:COMPONENT-VERSION",
],
tags = ["maven_coordinates=com.digitalasset.platform:sandbox:__VERSION__"],
visibility = [
"//visibility:public",
],
runtime_deps = [
"@maven//:ch_qos_logback_logback_classic",
"@maven//:ch_qos_logback_logback_core",
],
deps = compileDependencies + ["//ledger/test-common"],
)
da_scala_library(
name = "ledger-api-server",
srcs = glob(["src/main/scala/**/*.scala"]),
resources =
glob(
["src/main/resources/**/*"],
# Do not include logback.xml into the library: let the user
# of the sandbox-as-a-library decide how to log.
exclude = ["src/main/resources/logback.xml"],
) + [
"//:COMPONENT-VERSION",
],
tags = ["maven_coordinates=com.daml.ledger:ledger-api-server:__VERSION__"],
visibility = [
"//visibility:public",
],
runtime_deps = [
"@maven//:ch_qos_logback_logback_classic",
"@maven//:ch_qos_logback_logback_core",
],
New Ledger API test tool (#2282) * New acceptance test tool prototype * Fix transaction filter helper * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308081386 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308082432 Moreover, creates specific helpers for test DAML code. * Move helpers from session to context Remove a circular dependency between session and context, and limits the usage of implicits. * Run tests with ledgers out of process * Prepare for drop in * Temporary timeout increase * Move bulk of the logic to the test runner * Have a map of tests for CLI integration * Timeout per-test, runner uses context, renaming * Allow usage of time service, integrate semantic tests * Integrate CLI SSL configuration * Integrate failure expectation CLI option * Integrate with failure output verbosity CLI option * Integrate with test listing and picking CLI options * Integrate with timeout scaling CLI option * Integrate with command TTL CLI option * Review CODEOWNERS * Drop previously unimplemented CLI parameters * Expand test todo list to encompass latest additions * Deduplicate some testing infrastructure, swap in new test tool * Remove unused rule * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311045444 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311051974 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311035287 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311055290 * WIP * Make gRPC thread factory spawn non-deamon threads * Remove debug prints, complete divulgence test (missing assertion messages) * Try to detect assertion failure line number * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311400695 * Remove TlsConfiguration duplicate, move original to commons * Make assertion more readable Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com> * Fix build errors introduced in previous commit - exclude time service tests from reference-v2 - add copyright header to TlsConfiguration * Complete divulgence test and address review comments Restores comments from original divulgence tests and strives to be as close to them as possible. - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311429169 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431156 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431913 * Delete old divulgence tests * Restore methods to fetch contracts by template identifier * Run conformance tests on in-memory sandbox * Run conformance tests on the persistent sandbox * Remove workflow identifier workaround * New contract keys test (#2452) * Set channel type for LedgerSession * Add ContractKeysIT * Run tests against reference-server v2 * Removed the old ContractKeysIT. However, ... ... I cannot remove ContractKeysChecks completely, because we have another test path for DARs created prior to DAML-LF 1.6, which doesn't have the submitter == maintainer restriction for contract keys. * Use codegen instead of custom code * Add missing copyright headers * Drop sandbox conformance test suite (seems to not work on Windows CI) * Make time simpler * Test tool tests to run only semantic tests * Make CI behave more consistently * Add missing files to run tests on Postrgres * Fix flaky divulgence test, introduce readable identifiers * Increase sandbox conformance tests timeout * Address https://github.com/digital-asset/daml/pull/2282#discussion_r312363246 * Reintroduce test resource extraction * Read semantic tests from the classpath rather than Bazel * Use codegen types for ContractKeys integration test allocateParty returns Primitive.Party and create and exercise also accept Primitive.Party. This way we don't have to keep a String and Primitive.Party representation around. * Bump timeout for sandbox conformance tests * Remove dependency on Bazel runfiles
2019-08-09 18:00:37 +03:00
deps = compileDependencies + ["//ledger/test-common"],
2019-04-04 11:33:38 +03:00
)
da_scala_binary(
name = "sandbox-binary",
main_class = "com.digitalasset.platform.sandbox.SandboxMain",
resources = ["src/main/resources/logback.xml"],
visibility = ["//visibility:public"],
deps = [
":sandbox",
],
2019-04-04 11:33:38 +03:00
)
New Ledger API test tool (#2282) * New acceptance test tool prototype * Fix transaction filter helper * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308081386 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308082432 Moreover, creates specific helpers for test DAML code. * Move helpers from session to context Remove a circular dependency between session and context, and limits the usage of implicits. * Run tests with ledgers out of process * Prepare for drop in * Temporary timeout increase * Move bulk of the logic to the test runner * Have a map of tests for CLI integration * Timeout per-test, runner uses context, renaming * Allow usage of time service, integrate semantic tests * Integrate CLI SSL configuration * Integrate failure expectation CLI option * Integrate with failure output verbosity CLI option * Integrate with test listing and picking CLI options * Integrate with timeout scaling CLI option * Integrate with command TTL CLI option * Review CODEOWNERS * Drop previously unimplemented CLI parameters * Expand test todo list to encompass latest additions * Deduplicate some testing infrastructure, swap in new test tool * Remove unused rule * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311045444 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311051974 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311035287 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311055290 * WIP * Make gRPC thread factory spawn non-deamon threads * Remove debug prints, complete divulgence test (missing assertion messages) * Try to detect assertion failure line number * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311400695 * Remove TlsConfiguration duplicate, move original to commons * Make assertion more readable Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com> * Fix build errors introduced in previous commit - exclude time service tests from reference-v2 - add copyright header to TlsConfiguration * Complete divulgence test and address review comments Restores comments from original divulgence tests and strives to be as close to them as possible. - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311429169 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431156 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431913 * Delete old divulgence tests * Restore methods to fetch contracts by template identifier * Run conformance tests on in-memory sandbox * Run conformance tests on the persistent sandbox * Remove workflow identifier workaround * New contract keys test (#2452) * Set channel type for LedgerSession * Add ContractKeysIT * Run tests against reference-server v2 * Removed the old ContractKeysIT. However, ... ... I cannot remove ContractKeysChecks completely, because we have another test path for DARs created prior to DAML-LF 1.6, which doesn't have the submitter == maintainer restriction for contract keys. * Use codegen instead of custom code * Add missing copyright headers * Drop sandbox conformance test suite (seems to not work on Windows CI) * Make time simpler * Test tool tests to run only semantic tests * Make CI behave more consistently * Add missing files to run tests on Postrgres * Fix flaky divulgence test, introduce readable identifiers * Increase sandbox conformance tests timeout * Address https://github.com/digital-asset/daml/pull/2282#discussion_r312363246 * Reintroduce test resource extraction * Read semantic tests from the classpath rather than Bazel * Use codegen types for ContractKeys integration test allocateParty returns Primitive.Party and create and exercise also accept Primitive.Party. This way we don't have to keep a String and Primitive.Party representation around. * Bump timeout for sandbox conformance tests * Remove dependency on Bazel runfiles
2019-08-09 18:00:37 +03:00
da_scala_binary(
name = "sandbox-ephemeral-postgres",
main_class = "com.digitalasset.platform.sandbox.persistence.EphemeralPostgresSandboxMain",
resources = ["src/main/resources/logback.xml"],
visibility = ["//visibility:public"],
deps = [
":sandbox",
":sandbox-scala-tests-lib",
],
)
2019-04-04 11:33:38 +03:00
genrule(
name = "sandbox-tarball",
srcs = [
":sandbox-binary_deploy.jar",
"//:component-version",
],
2019-04-04 11:33:38 +03:00
outs = ["sandbox-tarball.tar.gz"],
cmd = """
VERSION=$$(cat $(location //:component-version))
mkdir -p sandbox-tarball/sandbox
cp -L $(location :sandbox-binary_deploy.jar) sandbox-tarball/sandbox/sandbox-$$VERSION.jar
out=$$(realpath $@)
cd sandbox-tarball
tar zcf $$out sandbox
2019-04-04 11:33:38 +03:00
""",
visibility = ["//visibility:public"],
2019-04-04 11:33:38 +03:00
)
alias(
name = "Test-1.5.dar",
actual = ":historical-dars/Test-1.5.dar",
visibility = ["//visibility:public"],
)
2019-04-04 11:33:38 +03:00
#TODO: generate dynamic BuildInfo.scala
testDependencies = [
":sandbox",
"//ledger/ledger-api-common:ledger-api-common-scala-tests-lib",
"//ledger/test-common:test-common",
"//ledger-api/testing-utils",
"@maven//:org_scalatest_scalatest_2_12",
"@maven//:org_scalacheck_scalacheck_2_12",
"@maven//:org_scalactic_scalactic_2_12",
"@maven//:org_awaitility_awaitility",
"@maven//:commons_io_commons_io",
"//bazel_tools/runfiles:scala_runfiles",
2019-04-04 11:33:38 +03:00
] + compileDependencies
da_scala_library(
name = "sandbox-scala-tests-lib",
srcs = glob(["src/test/lib/**/*.scala"]),
visibility = ["//visibility:public"],
deps = testDependencies,
2019-04-04 11:33:38 +03:00
)
da_scala_test_suite(
name = "sandbox-scala-tests",
srcs = glob(
["src/test/suite/**/*.scala"],
2019-04-04 11:33:38 +03:00
),
data = [
"//ledger/test-common:Test-stable.dar",
"@postgresql_dev_env//:all",
"@postgresql_dev_env//:createdb",
"@postgresql_dev_env//:initdb",
"@postgresql_dev_env//:pg_ctl",
],
resources = glob(["src/test/resources/**/*"]),
2019-04-04 11:33:38 +03:00
deps = [
":sandbox-scala-tests-lib",
] + testDependencies,
)
New Ledger API test tool (#2282) * New acceptance test tool prototype * Fix transaction filter helper * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308081386 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308082432 Moreover, creates specific helpers for test DAML code. * Move helpers from session to context Remove a circular dependency between session and context, and limits the usage of implicits. * Run tests with ledgers out of process * Prepare for drop in * Temporary timeout increase * Move bulk of the logic to the test runner * Have a map of tests for CLI integration * Timeout per-test, runner uses context, renaming * Allow usage of time service, integrate semantic tests * Integrate CLI SSL configuration * Integrate failure expectation CLI option * Integrate with failure output verbosity CLI option * Integrate with test listing and picking CLI options * Integrate with timeout scaling CLI option * Integrate with command TTL CLI option * Review CODEOWNERS * Drop previously unimplemented CLI parameters * Expand test todo list to encompass latest additions * Deduplicate some testing infrastructure, swap in new test tool * Remove unused rule * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311045444 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311051974 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311035287 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311055290 * WIP * Make gRPC thread factory spawn non-deamon threads * Remove debug prints, complete divulgence test (missing assertion messages) * Try to detect assertion failure line number * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311400695 * Remove TlsConfiguration duplicate, move original to commons * Make assertion more readable Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com> * Fix build errors introduced in previous commit - exclude time service tests from reference-v2 - add copyright header to TlsConfiguration * Complete divulgence test and address review comments Restores comments from original divulgence tests and strives to be as close to them as possible. - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311429169 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431156 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431913 * Delete old divulgence tests * Restore methods to fetch contracts by template identifier * Run conformance tests on in-memory sandbox * Run conformance tests on the persistent sandbox * Remove workflow identifier workaround * New contract keys test (#2452) * Set channel type for LedgerSession * Add ContractKeysIT * Run tests against reference-server v2 * Removed the old ContractKeysIT. However, ... ... I cannot remove ContractKeysChecks completely, because we have another test path for DARs created prior to DAML-LF 1.6, which doesn't have the submitter == maintainer restriction for contract keys. * Use codegen instead of custom code * Add missing copyright headers * Drop sandbox conformance test suite (seems to not work on Windows CI) * Make time simpler * Test tool tests to run only semantic tests * Make CI behave more consistently * Add missing files to run tests on Postrgres * Fix flaky divulgence test, introduce readable identifiers * Increase sandbox conformance tests timeout * Address https://github.com/digital-asset/daml/pull/2282#discussion_r312363246 * Reintroduce test resource extraction * Read semantic tests from the classpath rather than Bazel * Use codegen types for ContractKeys integration test allocateParty returns Primitive.Party and create and exercise also accept Primitive.Party. This way we don't have to keep a String and Primitive.Party representation around. * Bump timeout for sandbox conformance tests * Remove dependency on Bazel runfiles
2019-08-09 18:00:37 +03:00
conformance_test(
New Ledger API test tool (#2282) * New acceptance test tool prototype * Fix transaction filter helper * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308081386 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308082432 Moreover, creates specific helpers for test DAML code. * Move helpers from session to context Remove a circular dependency between session and context, and limits the usage of implicits. * Run tests with ledgers out of process * Prepare for drop in * Temporary timeout increase * Move bulk of the logic to the test runner * Have a map of tests for CLI integration * Timeout per-test, runner uses context, renaming * Allow usage of time service, integrate semantic tests * Integrate CLI SSL configuration * Integrate failure expectation CLI option * Integrate with failure output verbosity CLI option * Integrate with test listing and picking CLI options * Integrate with timeout scaling CLI option * Integrate with command TTL CLI option * Review CODEOWNERS * Drop previously unimplemented CLI parameters * Expand test todo list to encompass latest additions * Deduplicate some testing infrastructure, swap in new test tool * Remove unused rule * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311045444 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311051974 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311035287 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311055290 * WIP * Make gRPC thread factory spawn non-deamon threads * Remove debug prints, complete divulgence test (missing assertion messages) * Try to detect assertion failure line number * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311400695 * Remove TlsConfiguration duplicate, move original to commons * Make assertion more readable Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com> * Fix build errors introduced in previous commit - exclude time service tests from reference-v2 - add copyright header to TlsConfiguration * Complete divulgence test and address review comments Restores comments from original divulgence tests and strives to be as close to them as possible. - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311429169 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431156 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431913 * Delete old divulgence tests * Restore methods to fetch contracts by template identifier * Run conformance tests on in-memory sandbox * Run conformance tests on the persistent sandbox * Remove workflow identifier workaround * New contract keys test (#2452) * Set channel type for LedgerSession * Add ContractKeysIT * Run tests against reference-server v2 * Removed the old ContractKeysIT. However, ... ... I cannot remove ContractKeysChecks completely, because we have another test path for DARs created prior to DAML-LF 1.6, which doesn't have the submitter == maintainer restriction for contract keys. * Use codegen instead of custom code * Add missing copyright headers * Drop sandbox conformance test suite (seems to not work on Windows CI) * Make time simpler * Test tool tests to run only semantic tests * Make CI behave more consistently * Add missing files to run tests on Postrgres * Fix flaky divulgence test, introduce readable identifiers * Increase sandbox conformance tests timeout * Address https://github.com/digital-asset/daml/pull/2282#discussion_r312363246 * Reintroduce test resource extraction * Read semantic tests from the classpath rather than Bazel * Use codegen types for ContractKeys integration test allocateParty returns Primitive.Party and create and exercise also accept Primitive.Party. This way we don't have to keep a String and Primitive.Party representation around. * Bump timeout for sandbox conformance tests * Remove dependency on Bazel runfiles
2019-08-09 18:00:37 +03:00
name = "conformance-test-static-time",
server = ":sandbox-binary",
New Ledger API test tool (#2282) * New acceptance test tool prototype * Fix transaction filter helper * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308081386 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308082432 Moreover, creates specific helpers for test DAML code. * Move helpers from session to context Remove a circular dependency between session and context, and limits the usage of implicits. * Run tests with ledgers out of process * Prepare for drop in * Temporary timeout increase * Move bulk of the logic to the test runner * Have a map of tests for CLI integration * Timeout per-test, runner uses context, renaming * Allow usage of time service, integrate semantic tests * Integrate CLI SSL configuration * Integrate failure expectation CLI option * Integrate with failure output verbosity CLI option * Integrate with test listing and picking CLI options * Integrate with timeout scaling CLI option * Integrate with command TTL CLI option * Review CODEOWNERS * Drop previously unimplemented CLI parameters * Expand test todo list to encompass latest additions * Deduplicate some testing infrastructure, swap in new test tool * Remove unused rule * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311045444 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311051974 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311035287 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311055290 * WIP * Make gRPC thread factory spawn non-deamon threads * Remove debug prints, complete divulgence test (missing assertion messages) * Try to detect assertion failure line number * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311400695 * Remove TlsConfiguration duplicate, move original to commons * Make assertion more readable Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com> * Fix build errors introduced in previous commit - exclude time service tests from reference-v2 - add copyright header to TlsConfiguration * Complete divulgence test and address review comments Restores comments from original divulgence tests and strives to be as close to them as possible. - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311429169 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431156 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431913 * Delete old divulgence tests * Restore methods to fetch contracts by template identifier * Run conformance tests on in-memory sandbox * Run conformance tests on the persistent sandbox * Remove workflow identifier workaround * New contract keys test (#2452) * Set channel type for LedgerSession * Add ContractKeysIT * Run tests against reference-server v2 * Removed the old ContractKeysIT. However, ... ... I cannot remove ContractKeysChecks completely, because we have another test path for DARs created prior to DAML-LF 1.6, which doesn't have the submitter == maintainer restriction for contract keys. * Use codegen instead of custom code * Add missing copyright headers * Drop sandbox conformance test suite (seems to not work on Windows CI) * Make time simpler * Test tool tests to run only semantic tests * Make CI behave more consistently * Add missing files to run tests on Postrgres * Fix flaky divulgence test, introduce readable identifiers * Increase sandbox conformance tests timeout * Address https://github.com/digital-asset/daml/pull/2282#discussion_r312363246 * Reintroduce test resource extraction * Read semantic tests from the classpath rather than Bazel * Use codegen types for ContractKeys integration test allocateParty returns Primitive.Party and create and exercise also accept Primitive.Party. This way we don't have to keep a String and Primitive.Party representation around. * Bump timeout for sandbox conformance tests * Remove dependency on Bazel runfiles
2019-08-09 18:00:37 +03:00
server_args = [
"--port 6865",
"--static-time",
"--eager-package-loading",
],
test_tool_args = [
New Ledger API test tool (#2282) * New acceptance test tool prototype * Fix transaction filter helper * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308081386 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308082432 Moreover, creates specific helpers for test DAML code. * Move helpers from session to context Remove a circular dependency between session and context, and limits the usage of implicits. * Run tests with ledgers out of process * Prepare for drop in * Temporary timeout increase * Move bulk of the logic to the test runner * Have a map of tests for CLI integration * Timeout per-test, runner uses context, renaming * Allow usage of time service, integrate semantic tests * Integrate CLI SSL configuration * Integrate failure expectation CLI option * Integrate with failure output verbosity CLI option * Integrate with test listing and picking CLI options * Integrate with timeout scaling CLI option * Integrate with command TTL CLI option * Review CODEOWNERS * Drop previously unimplemented CLI parameters * Expand test todo list to encompass latest additions * Deduplicate some testing infrastructure, swap in new test tool * Remove unused rule * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311045444 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311051974 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311035287 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311055290 * WIP * Make gRPC thread factory spawn non-deamon threads * Remove debug prints, complete divulgence test (missing assertion messages) * Try to detect assertion failure line number * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311400695 * Remove TlsConfiguration duplicate, move original to commons * Make assertion more readable Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com> * Fix build errors introduced in previous commit - exclude time service tests from reference-v2 - add copyright header to TlsConfiguration * Complete divulgence test and address review comments Restores comments from original divulgence tests and strives to be as close to them as possible. - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311429169 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431156 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431913 * Delete old divulgence tests * Restore methods to fetch contracts by template identifier * Run conformance tests on in-memory sandbox * Run conformance tests on the persistent sandbox * Remove workflow identifier workaround * New contract keys test (#2452) * Set channel type for LedgerSession * Add ContractKeysIT * Run tests against reference-server v2 * Removed the old ContractKeysIT. However, ... ... I cannot remove ContractKeysChecks completely, because we have another test path for DARs created prior to DAML-LF 1.6, which doesn't have the submitter == maintainer restriction for contract keys. * Use codegen instead of custom code * Add missing copyright headers * Drop sandbox conformance test suite (seems to not work on Windows CI) * Make time simpler * Test tool tests to run only semantic tests * Make CI behave more consistently * Add missing files to run tests on Postrgres * Fix flaky divulgence test, introduce readable identifiers * Increase sandbox conformance tests timeout * Address https://github.com/digital-asset/daml/pull/2282#discussion_r312363246 * Reintroduce test resource extraction * Read semantic tests from the classpath rather than Bazel * Use codegen types for ContractKeys integration test allocateParty returns Primitive.Party and create and exercise also accept Primitive.Party. This way we don't have to keep a String and Primitive.Party representation around. * Bump timeout for sandbox conformance tests * Remove dependency on Bazel runfiles
2019-08-09 18:00:37 +03:00
"--all-tests",
"--timeout-scale-factor=10",
],
)
conformance_test(
name = "conformance-test-wall-clock",
server = ":sandbox-binary",
New Ledger API test tool (#2282) * New acceptance test tool prototype * Fix transaction filter helper * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308081386 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308082432 Moreover, creates specific helpers for test DAML code. * Move helpers from session to context Remove a circular dependency between session and context, and limits the usage of implicits. * Run tests with ledgers out of process * Prepare for drop in * Temporary timeout increase * Move bulk of the logic to the test runner * Have a map of tests for CLI integration * Timeout per-test, runner uses context, renaming * Allow usage of time service, integrate semantic tests * Integrate CLI SSL configuration * Integrate failure expectation CLI option * Integrate with failure output verbosity CLI option * Integrate with test listing and picking CLI options * Integrate with timeout scaling CLI option * Integrate with command TTL CLI option * Review CODEOWNERS * Drop previously unimplemented CLI parameters * Expand test todo list to encompass latest additions * Deduplicate some testing infrastructure, swap in new test tool * Remove unused rule * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311045444 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311051974 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311035287 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311055290 * WIP * Make gRPC thread factory spawn non-deamon threads * Remove debug prints, complete divulgence test (missing assertion messages) * Try to detect assertion failure line number * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311400695 * Remove TlsConfiguration duplicate, move original to commons * Make assertion more readable Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com> * Fix build errors introduced in previous commit - exclude time service tests from reference-v2 - add copyright header to TlsConfiguration * Complete divulgence test and address review comments Restores comments from original divulgence tests and strives to be as close to them as possible. - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311429169 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431156 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431913 * Delete old divulgence tests * Restore methods to fetch contracts by template identifier * Run conformance tests on in-memory sandbox * Run conformance tests on the persistent sandbox * Remove workflow identifier workaround * New contract keys test (#2452) * Set channel type for LedgerSession * Add ContractKeysIT * Run tests against reference-server v2 * Removed the old ContractKeysIT. However, ... ... I cannot remove ContractKeysChecks completely, because we have another test path for DARs created prior to DAML-LF 1.6, which doesn't have the submitter == maintainer restriction for contract keys. * Use codegen instead of custom code * Add missing copyright headers * Drop sandbox conformance test suite (seems to not work on Windows CI) * Make time simpler * Test tool tests to run only semantic tests * Make CI behave more consistently * Add missing files to run tests on Postrgres * Fix flaky divulgence test, introduce readable identifiers * Increase sandbox conformance tests timeout * Address https://github.com/digital-asset/daml/pull/2282#discussion_r312363246 * Reintroduce test resource extraction * Read semantic tests from the classpath rather than Bazel * Use codegen types for ContractKeys integration test allocateParty returns Primitive.Party and create and exercise also accept Primitive.Party. This way we don't have to keep a String and Primitive.Party representation around. * Bump timeout for sandbox conformance tests * Remove dependency on Bazel runfiles
2019-08-09 18:00:37 +03:00
server_args = [
"--port 6865",
"--wall-clock-time",
"--eager-package-loading",
],
test_tool_args = [
New Ledger API test tool (#2282) * New acceptance test tool prototype * Fix transaction filter helper * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308081386 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308082432 Moreover, creates specific helpers for test DAML code. * Move helpers from session to context Remove a circular dependency between session and context, and limits the usage of implicits. * Run tests with ledgers out of process * Prepare for drop in * Temporary timeout increase * Move bulk of the logic to the test runner * Have a map of tests for CLI integration * Timeout per-test, runner uses context, renaming * Allow usage of time service, integrate semantic tests * Integrate CLI SSL configuration * Integrate failure expectation CLI option * Integrate with failure output verbosity CLI option * Integrate with test listing and picking CLI options * Integrate with timeout scaling CLI option * Integrate with command TTL CLI option * Review CODEOWNERS * Drop previously unimplemented CLI parameters * Expand test todo list to encompass latest additions * Deduplicate some testing infrastructure, swap in new test tool * Remove unused rule * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311045444 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311051974 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311035287 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311055290 * WIP * Make gRPC thread factory spawn non-deamon threads * Remove debug prints, complete divulgence test (missing assertion messages) * Try to detect assertion failure line number * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311400695 * Remove TlsConfiguration duplicate, move original to commons * Make assertion more readable Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com> * Fix build errors introduced in previous commit - exclude time service tests from reference-v2 - add copyright header to TlsConfiguration * Complete divulgence test and address review comments Restores comments from original divulgence tests and strives to be as close to them as possible. - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311429169 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431156 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431913 * Delete old divulgence tests * Restore methods to fetch contracts by template identifier * Run conformance tests on in-memory sandbox * Run conformance tests on the persistent sandbox * Remove workflow identifier workaround * New contract keys test (#2452) * Set channel type for LedgerSession * Add ContractKeysIT * Run tests against reference-server v2 * Removed the old ContractKeysIT. However, ... ... I cannot remove ContractKeysChecks completely, because we have another test path for DARs created prior to DAML-LF 1.6, which doesn't have the submitter == maintainer restriction for contract keys. * Use codegen instead of custom code * Add missing copyright headers * Drop sandbox conformance test suite (seems to not work on Windows CI) * Make time simpler * Test tool tests to run only semantic tests * Make CI behave more consistently * Add missing files to run tests on Postrgres * Fix flaky divulgence test, introduce readable identifiers * Increase sandbox conformance tests timeout * Address https://github.com/digital-asset/daml/pull/2282#discussion_r312363246 * Reintroduce test resource extraction * Read semantic tests from the classpath rather than Bazel * Use codegen types for ContractKeys integration test allocateParty returns Primitive.Party and create and exercise also accept Primitive.Party. This way we don't have to keep a String and Primitive.Party representation around. * Bump timeout for sandbox conformance tests * Remove dependency on Bazel runfiles
2019-08-09 18:00:37 +03:00
"--all-tests",
"--exclude TimeIT",
New Ledger API test tool (#2282) * New acceptance test tool prototype * Fix transaction filter helper * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308081386 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308082432 Moreover, creates specific helpers for test DAML code. * Move helpers from session to context Remove a circular dependency between session and context, and limits the usage of implicits. * Run tests with ledgers out of process * Prepare for drop in * Temporary timeout increase * Move bulk of the logic to the test runner * Have a map of tests for CLI integration * Timeout per-test, runner uses context, renaming * Allow usage of time service, integrate semantic tests * Integrate CLI SSL configuration * Integrate failure expectation CLI option * Integrate with failure output verbosity CLI option * Integrate with test listing and picking CLI options * Integrate with timeout scaling CLI option * Integrate with command TTL CLI option * Review CODEOWNERS * Drop previously unimplemented CLI parameters * Expand test todo list to encompass latest additions * Deduplicate some testing infrastructure, swap in new test tool * Remove unused rule * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311045444 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311051974 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311035287 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311055290 * WIP * Make gRPC thread factory spawn non-deamon threads * Remove debug prints, complete divulgence test (missing assertion messages) * Try to detect assertion failure line number * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311400695 * Remove TlsConfiguration duplicate, move original to commons * Make assertion more readable Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com> * Fix build errors introduced in previous commit - exclude time service tests from reference-v2 - add copyright header to TlsConfiguration * Complete divulgence test and address review comments Restores comments from original divulgence tests and strives to be as close to them as possible. - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311429169 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431156 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431913 * Delete old divulgence tests * Restore methods to fetch contracts by template identifier * Run conformance tests on in-memory sandbox * Run conformance tests on the persistent sandbox * Remove workflow identifier workaround * New contract keys test (#2452) * Set channel type for LedgerSession * Add ContractKeysIT * Run tests against reference-server v2 * Removed the old ContractKeysIT. However, ... ... I cannot remove ContractKeysChecks completely, because we have another test path for DARs created prior to DAML-LF 1.6, which doesn't have the submitter == maintainer restriction for contract keys. * Use codegen instead of custom code * Add missing copyright headers * Drop sandbox conformance test suite (seems to not work on Windows CI) * Make time simpler * Test tool tests to run only semantic tests * Make CI behave more consistently * Add missing files to run tests on Postrgres * Fix flaky divulgence test, introduce readable identifiers * Increase sandbox conformance tests timeout * Address https://github.com/digital-asset/daml/pull/2282#discussion_r312363246 * Reintroduce test resource extraction * Read semantic tests from the classpath rather than Bazel * Use codegen types for ContractKeys integration test allocateParty returns Primitive.Party and create and exercise also accept Primitive.Party. This way we don't have to keep a String and Primitive.Party representation around. * Bump timeout for sandbox conformance tests * Remove dependency on Bazel runfiles
2019-08-09 18:00:37 +03:00
"--timeout-scale-factor=10",
],
)
conformance_test(
name = "conformance-test-static-time-postgres",
extra_data = [
New Ledger API test tool (#2282) * New acceptance test tool prototype * Fix transaction filter helper * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308081386 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308082432 Moreover, creates specific helpers for test DAML code. * Move helpers from session to context Remove a circular dependency between session and context, and limits the usage of implicits. * Run tests with ledgers out of process * Prepare for drop in * Temporary timeout increase * Move bulk of the logic to the test runner * Have a map of tests for CLI integration * Timeout per-test, runner uses context, renaming * Allow usage of time service, integrate semantic tests * Integrate CLI SSL configuration * Integrate failure expectation CLI option * Integrate with failure output verbosity CLI option * Integrate with test listing and picking CLI options * Integrate with timeout scaling CLI option * Integrate with command TTL CLI option * Review CODEOWNERS * Drop previously unimplemented CLI parameters * Expand test todo list to encompass latest additions * Deduplicate some testing infrastructure, swap in new test tool * Remove unused rule * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311045444 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311051974 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311035287 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311055290 * WIP * Make gRPC thread factory spawn non-deamon threads * Remove debug prints, complete divulgence test (missing assertion messages) * Try to detect assertion failure line number * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311400695 * Remove TlsConfiguration duplicate, move original to commons * Make assertion more readable Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com> * Fix build errors introduced in previous commit - exclude time service tests from reference-v2 - add copyright header to TlsConfiguration * Complete divulgence test and address review comments Restores comments from original divulgence tests and strives to be as close to them as possible. - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311429169 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431156 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431913 * Delete old divulgence tests * Restore methods to fetch contracts by template identifier * Run conformance tests on in-memory sandbox * Run conformance tests on the persistent sandbox * Remove workflow identifier workaround * New contract keys test (#2452) * Set channel type for LedgerSession * Add ContractKeysIT * Run tests against reference-server v2 * Removed the old ContractKeysIT. However, ... ... I cannot remove ContractKeysChecks completely, because we have another test path for DARs created prior to DAML-LF 1.6, which doesn't have the submitter == maintainer restriction for contract keys. * Use codegen instead of custom code * Add missing copyright headers * Drop sandbox conformance test suite (seems to not work on Windows CI) * Make time simpler * Test tool tests to run only semantic tests * Make CI behave more consistently * Add missing files to run tests on Postrgres * Fix flaky divulgence test, introduce readable identifiers * Increase sandbox conformance tests timeout * Address https://github.com/digital-asset/daml/pull/2282#discussion_r312363246 * Reintroduce test resource extraction * Read semantic tests from the classpath rather than Bazel * Use codegen types for ContractKeys integration test allocateParty returns Primitive.Party and create and exercise also accept Primitive.Party. This way we don't have to keep a String and Primitive.Party representation around. * Bump timeout for sandbox conformance tests * Remove dependency on Bazel runfiles
2019-08-09 18:00:37 +03:00
"@postgresql_dev_env//:all",
"@postgresql_dev_env//:createdb",
"@postgresql_dev_env//:initdb",
"@postgresql_dev_env//:pg_ctl",
],
server = ":sandbox-ephemeral-postgres",
New Ledger API test tool (#2282) * New acceptance test tool prototype * Fix transaction filter helper * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308081386 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308082432 Moreover, creates specific helpers for test DAML code. * Move helpers from session to context Remove a circular dependency between session and context, and limits the usage of implicits. * Run tests with ledgers out of process * Prepare for drop in * Temporary timeout increase * Move bulk of the logic to the test runner * Have a map of tests for CLI integration * Timeout per-test, runner uses context, renaming * Allow usage of time service, integrate semantic tests * Integrate CLI SSL configuration * Integrate failure expectation CLI option * Integrate with failure output verbosity CLI option * Integrate with test listing and picking CLI options * Integrate with timeout scaling CLI option * Integrate with command TTL CLI option * Review CODEOWNERS * Drop previously unimplemented CLI parameters * Expand test todo list to encompass latest additions * Deduplicate some testing infrastructure, swap in new test tool * Remove unused rule * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311045444 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311051974 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311035287 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311055290 * WIP * Make gRPC thread factory spawn non-deamon threads * Remove debug prints, complete divulgence test (missing assertion messages) * Try to detect assertion failure line number * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311400695 * Remove TlsConfiguration duplicate, move original to commons * Make assertion more readable Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com> * Fix build errors introduced in previous commit - exclude time service tests from reference-v2 - add copyright header to TlsConfiguration * Complete divulgence test and address review comments Restores comments from original divulgence tests and strives to be as close to them as possible. - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311429169 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431156 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431913 * Delete old divulgence tests * Restore methods to fetch contracts by template identifier * Run conformance tests on in-memory sandbox * Run conformance tests on the persistent sandbox * Remove workflow identifier workaround * New contract keys test (#2452) * Set channel type for LedgerSession * Add ContractKeysIT * Run tests against reference-server v2 * Removed the old ContractKeysIT. However, ... ... I cannot remove ContractKeysChecks completely, because we have another test path for DARs created prior to DAML-LF 1.6, which doesn't have the submitter == maintainer restriction for contract keys. * Use codegen instead of custom code * Add missing copyright headers * Drop sandbox conformance test suite (seems to not work on Windows CI) * Make time simpler * Test tool tests to run only semantic tests * Make CI behave more consistently * Add missing files to run tests on Postrgres * Fix flaky divulgence test, introduce readable identifiers * Increase sandbox conformance tests timeout * Address https://github.com/digital-asset/daml/pull/2282#discussion_r312363246 * Reintroduce test resource extraction * Read semantic tests from the classpath rather than Bazel * Use codegen types for ContractKeys integration test allocateParty returns Primitive.Party and create and exercise also accept Primitive.Party. This way we don't have to keep a String and Primitive.Party representation around. * Bump timeout for sandbox conformance tests * Remove dependency on Bazel runfiles
2019-08-09 18:00:37 +03:00
server_args = [
"--port 6865",
"--static-time",
"--eager-package-loading",
],
test_tool_args = [
"--all-tests",
"--timeout-scale-factor=10",
],
)
conformance_test(
name = "conformance-test-wall-clock-postgres",
extra_data = [
"@postgresql_dev_env//:all",
"@postgresql_dev_env//:createdb",
"@postgresql_dev_env//:initdb",
"@postgresql_dev_env//:pg_ctl",
],
server = ":sandbox-ephemeral-postgres",
server_args = [
"--port 6865",
"--wall-clock-time",
"--eager-package-loading",
],
test_tool_args = [
New Ledger API test tool (#2282) * New acceptance test tool prototype * Fix transaction filter helper * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308081386 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308082432 Moreover, creates specific helpers for test DAML code. * Move helpers from session to context Remove a circular dependency between session and context, and limits the usage of implicits. * Run tests with ledgers out of process * Prepare for drop in * Temporary timeout increase * Move bulk of the logic to the test runner * Have a map of tests for CLI integration * Timeout per-test, runner uses context, renaming * Allow usage of time service, integrate semantic tests * Integrate CLI SSL configuration * Integrate failure expectation CLI option * Integrate with failure output verbosity CLI option * Integrate with test listing and picking CLI options * Integrate with timeout scaling CLI option * Integrate with command TTL CLI option * Review CODEOWNERS * Drop previously unimplemented CLI parameters * Expand test todo list to encompass latest additions * Deduplicate some testing infrastructure, swap in new test tool * Remove unused rule * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311045444 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311051974 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311035287 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311055290 * WIP * Make gRPC thread factory spawn non-deamon threads * Remove debug prints, complete divulgence test (missing assertion messages) * Try to detect assertion failure line number * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311400695 * Remove TlsConfiguration duplicate, move original to commons * Make assertion more readable Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com> * Fix build errors introduced in previous commit - exclude time service tests from reference-v2 - add copyright header to TlsConfiguration * Complete divulgence test and address review comments Restores comments from original divulgence tests and strives to be as close to them as possible. - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311429169 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431156 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431913 * Delete old divulgence tests * Restore methods to fetch contracts by template identifier * Run conformance tests on in-memory sandbox * Run conformance tests on the persistent sandbox * Remove workflow identifier workaround * New contract keys test (#2452) * Set channel type for LedgerSession * Add ContractKeysIT * Run tests against reference-server v2 * Removed the old ContractKeysIT. However, ... ... I cannot remove ContractKeysChecks completely, because we have another test path for DARs created prior to DAML-LF 1.6, which doesn't have the submitter == maintainer restriction for contract keys. * Use codegen instead of custom code * Add missing copyright headers * Drop sandbox conformance test suite (seems to not work on Windows CI) * Make time simpler * Test tool tests to run only semantic tests * Make CI behave more consistently * Add missing files to run tests on Postrgres * Fix flaky divulgence test, introduce readable identifiers * Increase sandbox conformance tests timeout * Address https://github.com/digital-asset/daml/pull/2282#discussion_r312363246 * Reintroduce test resource extraction * Read semantic tests from the classpath rather than Bazel * Use codegen types for ContractKeys integration test allocateParty returns Primitive.Party and create and exercise also accept Primitive.Party. This way we don't have to keep a String and Primitive.Party representation around. * Bump timeout for sandbox conformance tests * Remove dependency on Bazel runfiles
2019-08-09 18:00:37 +03:00
"--all-tests",
"--exclude TimeIT",
"--timeout-scale-factor=10",
],
)
conformance_test(
name = "conformance-test-static-time-h2database",
server = ":sandbox-binary",
New Ledger API test tool (#2282) * New acceptance test tool prototype * Fix transaction filter helper * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308081386 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r308082432 Moreover, creates specific helpers for test DAML code. * Move helpers from session to context Remove a circular dependency between session and context, and limits the usage of implicits. * Run tests with ledgers out of process * Prepare for drop in * Temporary timeout increase * Move bulk of the logic to the test runner * Have a map of tests for CLI integration * Timeout per-test, runner uses context, renaming * Allow usage of time service, integrate semantic tests * Integrate CLI SSL configuration * Integrate failure expectation CLI option * Integrate with failure output verbosity CLI option * Integrate with test listing and picking CLI options * Integrate with timeout scaling CLI option * Integrate with command TTL CLI option * Review CODEOWNERS * Drop previously unimplemented CLI parameters * Expand test todo list to encompass latest additions * Deduplicate some testing infrastructure, swap in new test tool * Remove unused rule * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311045444 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311051974 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311035287 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311055290 * WIP * Make gRPC thread factory spawn non-deamon threads * Remove debug prints, complete divulgence test (missing assertion messages) * Try to detect assertion failure line number * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Add Sandbox binary that starts an ephemeral postgres instance This allows us to use the client_server_test bazel macro to run against the sandbox backed by postgres. Fixes #1543 * Address https://github.com/digital-asset/daml/pull/2282#discussion_r311400695 * Remove TlsConfiguration duplicate, move original to commons * Make assertion more readable Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com> * Fix build errors introduced in previous commit - exclude time service tests from reference-v2 - add copyright header to TlsConfiguration * Complete divulgence test and address review comments Restores comments from original divulgence tests and strives to be as close to them as possible. - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311429169 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431156 - Address https://github.com/digital-asset/daml/pull/2282#discussion_r311431913 * Delete old divulgence tests * Restore methods to fetch contracts by template identifier * Run conformance tests on in-memory sandbox * Run conformance tests on the persistent sandbox * Remove workflow identifier workaround * New contract keys test (#2452) * Set channel type for LedgerSession * Add ContractKeysIT * Run tests against reference-server v2 * Removed the old ContractKeysIT. However, ... ... I cannot remove ContractKeysChecks completely, because we have another test path for DARs created prior to DAML-LF 1.6, which doesn't have the submitter == maintainer restriction for contract keys. * Use codegen instead of custom code * Add missing copyright headers * Drop sandbox conformance test suite (seems to not work on Windows CI) * Make time simpler * Test tool tests to run only semantic tests * Make CI behave more consistently * Add missing files to run tests on Postrgres * Fix flaky divulgence test, introduce readable identifiers * Increase sandbox conformance tests timeout * Address https://github.com/digital-asset/daml/pull/2282#discussion_r312363246 * Reintroduce test resource extraction * Read semantic tests from the classpath rather than Bazel * Use codegen types for ContractKeys integration test allocateParty returns Primitive.Party and create and exercise also accept Primitive.Party. This way we don't have to keep a String and Primitive.Party representation around. * Bump timeout for sandbox conformance tests * Remove dependency on Bazel runfiles
2019-08-09 18:00:37 +03:00
server_args = [
"--port 6865",
"--static-time",
"--eager-package-loading",
# db_close_delay=-1 is needed so that the in-memory database is not closed (and therefore lost)
# after the flyway migration
"--sql-backend-jdbcurl jdbc:h2:mem:static_time;db_close_delay=-1",
],
test_tool_args = [
"--all-tests",
"--timeout-scale-factor=10",
],
)
conformance_test(
name = "conformance-test-wall-clock-h2database",
server = ":sandbox-binary",
server_args = [
"--port 6865",
"--wall-clock-time",
"--eager-package-loading",
# db_close_delay=-1 is needed so that the in-memory database is not closed (and therefore lost)
# after the flyway migration
"--sql-backend-jdbcurl jdbc:h2:mem:wall_clock_time;db_close_delay=-1",
],
test_tool_args = [
"--all-tests",
"--exclude TimeIT",
"--timeout-scale-factor=10",
],
)