Closed darkrift closed 5 months ago
service_test should merge it's env with the integration test it launches.
service_test
If a duplicate key is found in both the service_test and the underlying test, fail the build with the possibility to override that behavior at a later time.
DEBUG: /private/var/tmp/_bazel_david.zbarsky/a972481bcfde40ab4d0f2f1c6ac38331/external/rules_itest~/private/itest.bzl:314:10: ENV {} DEBUG: /private/var/tmp/_bazel_david.zbarsky/a972481bcfde40ab4d0f2f1c6ac38331/external/rules_itest~/private/itest.bzl:314:10: ENV {} DEBUG: /private/var/tmp/_bazel_david.zbarsky/a972481bcfde40ab4d0f2f1c6ac38331/external/rules_itest~/private/itest.bzl:314:10: ENV {} DEBUG: /private/var/tmp/_bazel_david.zbarsky/a972481bcfde40ab4d0f2f1c6ac38331/external/rules_itest~/private/itest.bzl:314:10: ENV {"ITEST_ENV_TEST": "test_value"} DEBUG: /private/var/tmp/_bazel_david.zbarsky/a972481bcfde40ab4d0f2f1c6ac38331/external/rules_itest~/private/itest.bzl:314:10: ENV {"ITEST_ENV_TEST": "test_value"} DEBUG: /private/var/tmp/_bazel_david.zbarsky/a972481bcfde40ab4d0f2f1c6ac38331/external/rules_itest~/private/itest.bzl:314:10: ENV {} DEBUG: /private/var/tmp/_bazel_david.zbarsky/a972481bcfde40ab4d0f2f1c6ac38331/external/rules_itest~/private/itest.bzl:314:10: ENV {} DEBUG: /private/var/tmp/_bazel_david.zbarsky/a972481bcfde40ab4d0f2f1c6ac38331/external/rules_itest~/private/itest.bzl:314:10: ENV {} DEBUG: /private/var/tmp/_bazel_david.zbarsky/a972481bcfde40ab4d0f2f1c6ac38331/external/rules_itest~/private/itest.bzl:314:10: ENV {} DEBUG: /private/var/tmp/_bazel_david.zbarsky/a972481bcfde40ab4d0f2f1c6ac38331/external/rules_itest~/private/itest.bzl:314:10: ENV {} DEBUG: /private/var/tmp/_bazel_david.zbarsky/a972481bcfde40ab4d0f2f1c6ac38331/external/rules_itest~/private/itest.bzl:314:10: ENV {}
+++ b/private/itest.bzl @@ -311,6 +311,8 @@ def _service_test_impl(ctx): env = ctx.attr.env | _run_environment(ctx, service_specs_file) env["SVCINIT_TEST_RLOCATION_PATH"] = to_rlocation_path(ctx, ctx.executable.test) + print("ENV", ctx.attr.test[RunEnvironmentInfo].environment) +
Fixed in https://github.com/dzbarsky/rules_itest/commit/e2b14e974230b520de54e268003120aedb6ee6be
service_test
should merge it's env with the integration test it launches.If a duplicate key is found in both the
service_test
and the underlying test, fail the build with the possibility to override that behavior at a later time.