diff --git a/bazel/cel-cpp.patch b/bazel/cel-cpp.patch index 15bf9dcd0729..dddd678e0ada 100644 --- a/bazel/cel-cpp.patch +++ b/bazel/cel-cpp.patch @@ -1,168 +1,75 @@ -diff --git a/base/memory_manager.cc b/base/memory_manager.cc -index 1b7b355..4c7810c 100644 ---- a/base/memory_manager.cc -+++ b/base/memory_manager.cc -@@ -234,7 +234,7 @@ class GlobalMemoryManager final : public MemoryManager { - void* Allocate(size_t size, size_t align) override { - static_cast(size); - static_cast(align); -- ABSL_INTERNAL_UNREACHABLE; -+ ABSL_UNREACHABLE(); - return nullptr; - } +diff --git a/eval/public/cel_value.cc b/eval/public/cel_value.cc +index 6aeff6d..c43864c 100644 +--- a/eval/public/cel_value.cc ++++ b/eval/public/cel_value.cc +@@ -107,7 +107,7 @@ struct DebugStringVisitor { -@@ -242,7 +242,7 @@ class GlobalMemoryManager final : public MemoryManager { - void OwnDestructor(void* pointer, void (*destructor)(void*)) override { - static_cast(pointer); - static_cast(destructor); -- ABSL_INTERNAL_UNREACHABLE; -+ ABSL_UNREACHABLE(); - } - }; + } // namespace -diff --git a/eval/eval/evaluator_stack.h b/eval/eval/evaluator_stack.h -index 1ecab27..9df65d7 100644 ---- a/eval/eval/evaluator_stack.h -+++ b/eval/eval/evaluator_stack.h -@@ -5,6 +5,7 @@ - #include - #include +-const absl::string_view kPayloadUrlMissingAttributePath = ++ABSL_CONST_INIT const absl::string_view kPayloadUrlMissingAttributePath = + cel::runtime_internal::kPayloadUrlMissingAttributePath; -+#include "absl/log/log.h" - #include "absl/types/span.h" - #include "eval/eval/attribute_trail.h" - #include "eval/public/cel_value.h" -diff --git a/eval/public/cel_expr_builder_factory.h b/eval/public/cel_expr_builder_factory.h -index 7321e29..0d0d5e6 100644 ---- a/eval/public/cel_expr_builder_factory.h -+++ b/eval/public/cel_expr_builder_factory.h -@@ -1,6 +1,7 @@ - #ifndef THIRD_PARTY_CEL_CPP_EVAL_PUBLIC_CEL_EXPR_BUILDER_FACTORY_H_ - #define THIRD_PARTY_CEL_CPP_EVAL_PUBLIC_CEL_EXPR_BUILDER_FACTORY_H_ + CelValue CelValue::CreateDuration(absl::Duration value) { +diff --git a/internal/strings.cc b/internal/strings.cc +index dc5a118..24457ab 100644 +--- a/internal/strings.cc ++++ b/internal/strings.cc +@@ -53,12 +53,12 @@ bool CheckForClosingString(absl::string_view source, + if (closing_str.empty()) return true; -+#include "absl/log/log.h" - #include "google/protobuf/descriptor.h" - #include "eval/public/cel_expression.h" - #include "eval/public/cel_options.h" -diff --git a/eval/public/cel_value.h b/eval/public/cel_value.h -index b2d13f8..73e1909 100644 ---- a/eval/public/cel_value.h -+++ b/eval/public/cel_value.h -@@ -25,7 +25,6 @@ - #include "absl/base/attributes.h" - #include "absl/base/macros.h" - #include "absl/base/optimization.h" --#include "absl/log/log.h" - #include "absl/status/status.h" - #include "absl/status/statusor.h" - #include "absl/strings/str_cat.h" -@@ -481,8 +480,8 @@ class CelValue { - } + const char* p = source.data(); +- const char* end = source.end(); ++ const char* end = p + source.size(); - // Crashes with a null pointer error. -- static void CrashNullPointer(Type type) ABSL_ATTRIBUTE_COLD { -- LOG(FATAL) << "Null pointer supplied for " << TypeName(type); // Crash ok -+ static void CrashNullPointer(Type) ABSL_ATTRIBUTE_COLD { -+ ABSL_ASSERT(false); - } + bool is_closed = false; + while (p + closing_str.length() <= end) { + if (*p != '\\') { +- size_t cur_pos = p - source.begin(); ++ size_t cur_pos = p - source.data(); + bool is_closing = + absl::StartsWith(absl::ClippedSubstr(source, cur_pos), closing_str); + if (is_closing && p + closing_str.length() < end) { +@@ -132,7 +132,7 @@ bool UnescapeInternal(absl::string_view source, absl::string_view closing_str, + dest->reserve(source.size()); - // Null pointer checker for pointer-based types. -@@ -493,11 +492,9 @@ class CelValue { - } + const char* p = source.data(); +- const char* end = source.end(); ++ const char* end = p + source.size(); + const char* last_byte = end - 1; - // Crashes with a type mismatch error. -- static void CrashTypeMismatch(Type requested_type, -- Type actual_type) ABSL_ATTRIBUTE_COLD { -- LOG(FATAL) << "Type mismatch" // Crash ok -- << ": expected " << TypeName(requested_type) // Crash ok -- << ", encountered " << TypeName(actual_type); // Crash ok -+ static void CrashTypeMismatch(Type, -+ Type) ABSL_ATTRIBUTE_COLD { -+ ABSL_ASSERT(false); + while (p < end) { +@@ -446,7 +446,9 @@ std::string EscapeInternal(absl::string_view src, bool escape_all_bytes, + // byte. + dest.reserve(src.size() * 4); + bool last_hex_escape = false; // true if last output char was \xNN. +- for (const char* p = src.begin(); p < src.end(); ++p) { ++ const char* p = src.data(); ++ const char* end = p + src.size(); ++ for (; p < end; ++p) { + unsigned char c = static_cast(*p); + bool is_hex_escape = false; + switch (c) { +@@ -552,7 +554,9 @@ std::string EscapeString(absl::string_view str) { + std::string EscapeBytes(absl::string_view str, bool escape_all_bytes, + char escape_quote_char) { + std::string escaped_bytes; +- for (const char* p = str.begin(); p < str.end(); ++p) { ++ const char* p = str.data(); ++ const char* end = p + str.size(); ++ for (; p < end; ++p) { + unsigned char c = *p; + if (escape_all_bytes || !absl::ascii_isprint(c)) { + escaped_bytes += "\\x"; +diff --git a/tools/flatbuffers_backed_impl.cc b/tools/flatbuffers_backed_impl.cc +index 10c0b1c..45ba72f 100644 +--- a/tools/flatbuffers_backed_impl.cc ++++ b/tools/flatbuffers_backed_impl.cc +@@ -130,6 +130,7 @@ class ObjectStringIndexedMapImpl : public CelMap { + return absl::nullopt; } - // Gets value of type specified -diff --git a/eval/public/portable_cel_expr_builder_factory.cc b/eval/public/portable_cel_expr_builder_factory.cc -index 80ac45c..7dceb93 100644 ---- a/eval/public/portable_cel_expr_builder_factory.cc -+++ b/eval/public/portable_cel_expr_builder_factory.cc -@@ -20,6 +20,7 @@ - #include - #include - -+#include "absl/log/log.h" - #include "absl/status/status.h" - #include "eval/compiler/flat_expr_builder.h" - #include "eval/public/cel_options.h" -diff --git a/eval/public/structs/BUILD b/eval/public/structs/BUILD -index 9187518..5151bb0 100644 ---- a/eval/public/structs/BUILD -+++ b/eval/public/structs/BUILD -@@ -192,7 +192,6 @@ cc_library( - hdrs = ["legacy_type_provider.h"], - deps = [ - ":legacy_type_adapter", -- "//base:type_provider", - "@com_google_absl//absl/types:optional", - ], - ) -diff --git a/eval/public/structs/field_access_impl.cc b/eval/public/structs/field_access_impl.cc -index 788a476..e4b70b3 100644 ---- a/eval/public/structs/field_access_impl.cc -+++ b/eval/public/structs/field_access_impl.cc -@@ -25,6 +25,7 @@ - #include "google/protobuf/arena.h" - #include "google/protobuf/map_field.h" - #include "absl/container/flat_hash_set.h" -+#include "absl/log/log.h" - #include "absl/status/status.h" - #include "absl/status/statusor.h" - #include "absl/strings/str_cat.h" -diff --git a/eval/public/structs/legacy_type_provider.h b/eval/public/structs/legacy_type_provider.h -index b1623fc..d3d88d6 100644 ---- a/eval/public/structs/legacy_type_provider.h -+++ b/eval/public/structs/legacy_type_provider.h -@@ -16,7 +16,6 @@ - #define THIRD_PARTY_CEL_CPP_EVAL_PUBLIC_STRUCTS_TYPE_PROVIDER_H_ - - #include "absl/types/optional.h" --#include "base/type_provider.h" - #include "eval/public/structs/legacy_type_adapter.h" ++ using CelMap::ListKeys; + absl::StatusOr ListKeys() const override { return &keys_; } - namespace google::api::expr::runtime { -@@ -25,8 +24,10 @@ namespace google::api::expr::runtime { - // - // Note: This API is not finalized. Consult the CEL team before introducing new - // implementations. --class LegacyTypeProvider : public cel::TypeProvider { -+class LegacyTypeProvider { - public: -+ virtual ~LegacyTypeProvider() = default; -+ - // Return LegacyTypeAdapter for the fully qualified type name if available. - // - // nullopt values are interpreted as not present. -@@ -45,7 +46,7 @@ class LegacyTypeProvider : public cel::TypeProvider { - // created ones, the TypeInfoApis returned from this method should be the same - // as the ones used in value creation. - virtual absl::optional ProvideLegacyTypeInfo( -- absl::string_view name) const { -+ absl::string_view) const { - return absl::nullopt; - } - }; -diff --git a/base/function_result.h b/base/function_result.h -index 9bc2d67..bf6110c 100644 ---- a/base/function_result.h -+++ b/base/function_result.h -@@ -26,7 +26,10 @@ namespace cel { - // allows for lazy evaluation of expensive functions. - class FunctionResult final { - public: -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wdefaulted-function-deleted" - FunctionResult() = default; -+#pragma GCC diagnostic pop - FunctionResult(const FunctionResult&) = default; - FunctionResult(FunctionResult&&) = default; - FunctionResult& operator=(const FunctionResult&) = default; + private: diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 4affb6bb757f..aa93c9c838d8 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -14,6 +14,23 @@ WINDOWS_SKIP_TARGETS = [ "envoy.tracers.dynamic_ot", "envoy.tracers.datadog", "envoy.tracers.opencensus", + # Extensions that require CEL. + "envoy.access_loggers.extension_filters.cel", + "envoy.rate_limit_descriptors.expr", + "envoy.filters.http.rate_limit_quota", + "envoy.formatter.cel", + "envoy.matching.inputs.cel_data_input", + "envoy.matching.matchers.cel_matcher", + # Wasm and RBAC extensions have a link dependency on CEL. + "envoy.access_loggers.wasm", + "envoy.bootstrap.wasm", + "envoy.filters.http.wasm", + "envoy.filters.network.wasm", + "envoy.stat_sinks.wasm", + # RBAC extensions have a link dependency on CEL. + "envoy.filters.http.rbac", + "envoy.filters.network.rbac", + "envoy.rbac.matchers.upstream_ip_port", ] NO_HTTP3_SKIP_TARGETS = [ diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 5a575838b441..d4822de85550 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -162,12 +162,12 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "Abseil", project_desc = "Open source collection of C++ libraries drawn from the most fundamental pieces of Google’s internal codebase", project_url = "https://abseil.io/", - version = "c8b33b0191a2db8364cacf94b267ea8a3f20ad83", - sha256 = "a7803eac00bf68eae1a84ee3b9fcf0c1173e8d9b89b2cee92c7b487ea65be2a9", + version = "20230802.1", + sha256 = "987ce98f02eefbaf930d6e38ab16aa05737234d7afbab2d5c4ea7adbe50c28ed", strip_prefix = "abseil-cpp-{version}", urls = ["https://github.com/abseil/abseil-cpp/archive/{version}.tar.gz"], use_category = ["dataplane_core", "controlplane"], - release_date = "2023-05-16", + release_date = "2023-09-18", cpe = "N/A", license = "Apache-2.0", license_url = "https://github.com/abseil/abseil-cpp/blob/{version}/LICENSE", @@ -1204,8 +1204,8 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "Common Expression Language (CEL) C++ library", project_desc = "Common Expression Language (CEL) C++ library", project_url = "https://opensource.google/projects/cel", - version = "da0aba702f44a41ec6d2eb4bbf6a9f01efc2746d", - sha256 = "d62b93fd07c6151749e83855157f3f2778d62c168318f9c40dfcfe1c336c496f", + version = "0abd738f9f54388452e6ebb0955eb039f9162b3d", + sha256 = "d163805320a782c5194b7496cdd5e8c9d9604eeffc1e531770cf6b130bc182fd", strip_prefix = "cel-cpp-{version}", urls = ["https://github.com/google/cel-cpp/archive/{version}.tar.gz"], use_category = ["dataplane_ext"], @@ -1225,7 +1225,7 @@ REPOSITORY_LOCATIONS_SPEC = dict( "envoy.matching.inputs.cel_data_input", "envoy.matching.matchers.cel_matcher", ], - release_date = "2023-03-08", + release_date = "2023-12-20", cpe = "N/A", ), com_github_google_flatbuffers = dict( diff --git a/source/extensions/common/wasm/context.cc b/source/extensions/common/wasm/context.cc index 8c51d0ac67b8..c1c9bfd2868e 100644 --- a/source/extensions/common/wasm/context.cc +++ b/source/extensions/common/wasm/context.cc @@ -36,11 +36,22 @@ #include "absl/container/node_hash_map.h" #include "absl/strings/str_cat.h" #include "absl/synchronization/mutex.h" + +#if defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Woverloaded-virtual" +#endif + #include "eval/public/cel_value.h" #include "eval/public/containers/field_access.h" #include "eval/public/containers/field_backed_list_impl.h" #include "eval/public/containers/field_backed_map_impl.h" #include "eval/public/structs/cel_proto_wrapper.h" + +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#endif + #include "include/proxy-wasm/pairs_util.h" #include "openssl/bytestring.h" #include "openssl/hmac.h" diff --git a/source/extensions/filters/common/expr/BUILD b/source/extensions/filters/common/expr/BUILD index ebeb45ce0adb..e3cc16200459 100644 --- a/source/extensions/filters/common/expr/BUILD +++ b/source/extensions/filters/common/expr/BUILD @@ -12,6 +12,7 @@ envoy_cc_library( name = "evaluator_lib", srcs = ["evaluator.cc"], hdrs = ["evaluator.h"], + tags = ["skip_on_windows"], deps = [ ":context_lib", "//envoy/singleton:manager_interface", @@ -29,6 +30,7 @@ envoy_cc_library( name = "context_lib", srcs = ["context.cc"], hdrs = ["context.h"], + tags = ["skip_on_windows"], deps = [ ":cel_state_lib", "//source/common/grpc:common_lib", @@ -52,6 +54,7 @@ envoy_cc_library( hdrs = [ "cel_state.h", ], + tags = ["skip_on_windows"], deps = [ "//envoy/stream_info:filter_state_interface", "//source/common/protobuf", diff --git a/source/extensions/filters/common/expr/cel_state.h b/source/extensions/filters/common/expr/cel_state.h index 6c4659dcc53b..9509ef19f3de 100644 --- a/source/extensions/filters/common/expr/cel_state.h +++ b/source/extensions/filters/common/expr/cel_state.h @@ -9,8 +9,18 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" + +#if defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Woverloaded-virtual" +#endif + #include "eval/public/cel_value.h" +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#endif + namespace Envoy { namespace Extensions { namespace Filters { diff --git a/source/extensions/filters/common/expr/context.cc b/source/extensions/filters/common/expr/context.cc index a609e8be884a..a84fe1e4cf47 100644 --- a/source/extensions/filters/common/expr/context.cc +++ b/source/extensions/filters/common/expr/context.cc @@ -303,6 +303,7 @@ class FilterStateObjectWrapper : public google::api::expr::runtime::CelMap { // Default stubs. int size() const override { return 0; } bool empty() const override { return true; } + using CelMap::ListKeys; absl::StatusOr ListKeys() const override { return &WrapperFields::get().Empty; } diff --git a/source/extensions/filters/common/expr/context.h b/source/extensions/filters/common/expr/context.h index ff1f127373cf..b397a6e35868 100644 --- a/source/extensions/filters/common/expr/context.h +++ b/source/extensions/filters/common/expr/context.h @@ -125,6 +125,7 @@ template class HeadersWrapper : public google::api::expr::runtime::Cel } int size() const override { return ListKeys().value()->size(); } bool empty() const override { return value_ == nullptr ? true : value_->empty(); } + using CelMap::ListKeys; absl::StatusOr ListKeys() const override { if (value_ == nullptr) { return &WrapperFields::get().Empty; @@ -158,6 +159,7 @@ class BaseWrapper : public google::api::expr::runtime::CelMap { public: BaseWrapper(Protobuf::Arena& arena) : arena_(arena) {} int size() const override { return 0; } + using CelMap::ListKeys; absl::StatusOr ListKeys() const override { return absl::UnimplementedError("ListKeys() is not implemented"); } diff --git a/source/extensions/filters/common/expr/evaluator.h b/source/extensions/filters/common/expr/evaluator.h index e250469298fe..8e243b40592d 100644 --- a/source/extensions/filters/common/expr/evaluator.h +++ b/source/extensions/filters/common/expr/evaluator.h @@ -6,10 +6,21 @@ #include "source/common/protobuf/protobuf.h" #include "source/extensions/filters/common/expr/context.h" +// CEL-CPP does not enforce unused parameter checks consistently, so we relax it here. + +#if defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#endif + #include "eval/public/activation.h" #include "eval/public/cel_expression.h" #include "eval/public/cel_value.h" +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#endif + namespace Envoy { namespace Extensions { namespace Filters { diff --git a/source/extensions/filters/common/rbac/BUILD b/source/extensions/filters/common/rbac/BUILD index 80a389104809..69df5c59201e 100644 --- a/source/extensions/filters/common/rbac/BUILD +++ b/source/extensions/filters/common/rbac/BUILD @@ -12,6 +12,7 @@ envoy_cc_library( name = "utility_lib", srcs = ["utility.cc"], hdrs = ["utility.h"], + tags = ["skip_on_windows"], deps = [ ":engine_lib", "//envoy/stats:stats_macros", @@ -27,6 +28,7 @@ envoy_cc_library( "matchers.h", ], external_deps = ["abseil_optional"], + tags = ["skip_on_windows"], deps = [ "//envoy/http:header_map_interface", "//envoy/network:connection_interface", @@ -46,6 +48,7 @@ envoy_cc_library( envoy_cc_library( name = "engine_interface", hdrs = ["engine.h"], + tags = ["skip_on_windows"], deps = [ "//envoy/http:filter_interface", "//envoy/http:header_map_interface", @@ -57,6 +60,7 @@ envoy_cc_library( name = "engine_lib", srcs = ["engine_impl.cc"], hdrs = ["engine_impl.h"], + tags = ["skip_on_windows"], deps = [ "//source/common/http/matching:data_impl_lib", "//source/common/http/matching:inputs_lib", diff --git a/source/extensions/matching/http/cel_input/BUILD b/source/extensions/matching/http/cel_input/BUILD index 0c283b322866..b68fefa162c1 100644 --- a/source/extensions/matching/http/cel_input/BUILD +++ b/source/extensions/matching/http/cel_input/BUILD @@ -14,6 +14,7 @@ envoy_cc_extension( hdrs = ["cel_input.h"], extra_visibility = [ ], + tags = ["skip_on_windows"], deps = [ "//envoy/http:filter_interface", "//envoy/http:header_map_interface", diff --git a/test/common/access_log/BUILD b/test/common/access_log/BUILD index 5269c116994b..ee2a2ef68481 100644 --- a/test/common/access_log/BUILD +++ b/test/common/access_log/BUILD @@ -21,7 +21,6 @@ envoy_cc_test( "//source/common/access_log:access_log_lib", "//source/common/stream_info:utility_lib", "//source/extensions/access_loggers/file:config", - "//source/extensions/access_loggers/filters/cel:config", "//source/extensions/access_loggers/stream:config", "//test/common/stream_info:test_util", "//test/common/upstream:utility_lib", @@ -36,7 +35,12 @@ envoy_cc_test( "//test/test_common:simulated_time_system_lib", "//test/test_common:utility_lib", "@envoy_api//envoy/config/accesslog/v3:pkg_cc_proto", - ], + ] + select({ + "//bazel:windows_x86_64": [], # TODO: fix the windows ANTLR build + "//conditions:default": [ + "//source/extensions/access_loggers/filters/cel:config", + ], + }), ) envoy_cc_test( diff --git a/test/config/integration/BUILD b/test/config/integration/BUILD index 0d7fbf3b4a36..d2d219f5f39a 100644 --- a/test/config/integration/BUILD +++ b/test/config/integration/BUILD @@ -36,6 +36,7 @@ filegroup( filegroup( name = "server_config_files", srcs = [ + "empty.yaml", "server.yaml", "server_multiple_addresses.yaml", "server_unix_listener.yaml", diff --git a/test/config/integration/empty.yaml b/test/config/integration/empty.yaml new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/test/config/integration/empty.yaml @@ -0,0 +1 @@ +{} diff --git a/test/config_test/config_test.cc b/test/config_test/config_test.cc index 645e6fb74e01..c41137526290 100644 --- a/test/config_test/config_test.cc +++ b/test/config_test/config_test.cc @@ -46,6 +46,9 @@ OptionsImpl asConfigYaml(const OptionsImpl& src, Api::Api& api) { } static std::vector unsuported_win32_configs = { +#if defined(WIN32) + "rbac_envoy.yaml", +#endif #if defined(WIN32) && !defined(SO_ORIGINAL_DST) "configs_original-dst-cluster_proxy_config.yaml" #endif diff --git a/test/extensions/access_loggers/grpc/BUILD b/test/extensions/access_loggers/grpc/BUILD index 05d5477338a7..caffcbb34d23 100644 --- a/test/extensions/access_loggers/grpc/BUILD +++ b/test/extensions/access_loggers/grpc/BUILD @@ -32,15 +32,25 @@ envoy_extension_cc_test( envoy_extension_cc_test( name = "grpc_access_log_utils_test", srcs = ["grpc_access_log_utils_test.cc"], + copts = select({ + "//bazel:windows_x86_64": [], # TODO: fix the windows CEL build + "//conditions:default": [ + "-DUSE_CEL", + ], + }), extension_names = ["envoy.access_loggers.http_grpc"], deps = [ "//source/extensions/access_loggers/grpc:grpc_access_log_utils", - "//source/extensions/filters/common/expr:cel_state_lib", "//test/mocks/local_info:local_info_mocks", "//test/mocks/ssl:ssl_mocks", "//test/mocks/stream_info:stream_info_mocks", "@envoy_api//envoy/data/accesslog/v3:pkg_cc_proto", - ], + ] + select({ + "//bazel:windows_x86_64": [], # TODO: fix the windows CEL build + "//conditions:default": [ + "//source/extensions/filters/common/expr:cel_state_lib", + ], + }), ) envoy_extension_cc_test( @@ -110,6 +120,12 @@ envoy_extension_cc_test( name = "tcp_grpc_access_log_integration_test", size = "large", srcs = ["tcp_grpc_access_log_integration_test.cc"], + copts = select({ + "//bazel:windows_x86_64": [], # TODO: fix the windows CEL build + "//conditions:default": [ + "-DUSE_CEL", + ], + }), extension_names = ["envoy.access_loggers.tcp_grpc"], deps = [ "//source/common/buffer:zero_copy_input_stream_lib", @@ -120,7 +136,6 @@ envoy_extension_cc_test( "//source/extensions/filters/listener/tls_inspector:config", "//source/extensions/filters/listener/tls_inspector:tls_inspector_lib", "//source/extensions/filters/network/echo:config", - "//source/extensions/filters/network/rbac:config", "//source/extensions/filters/network/tcp_proxy:config", "//source/extensions/transport_sockets/tls:config", "//source/extensions/transport_sockets/tls:context_config_lib", @@ -135,5 +150,10 @@ envoy_extension_cc_test( "@envoy_api//envoy/extensions/filters/network/rbac/v3:pkg_cc_proto", "@envoy_api//envoy/extensions/filters/network/tcp_proxy/v3:pkg_cc_proto", "@envoy_api//envoy/service/accesslog/v3:pkg_cc_proto", - ], + ] + select({ + "//bazel:windows_x86_64": [], # TODO: fix the windows CEL build + "//conditions:default": [ + "//source/extensions/filters/network/rbac:config", + ], + }), ) diff --git a/test/extensions/access_loggers/grpc/grpc_access_log_utils_test.cc b/test/extensions/access_loggers/grpc/grpc_access_log_utils_test.cc index 372b7512e631..313430b21786 100644 --- a/test/extensions/access_loggers/grpc/grpc_access_log_utils_test.cc +++ b/test/extensions/access_loggers/grpc/grpc_access_log_utils_test.cc @@ -3,7 +3,10 @@ #include "source/common/http/header_map_impl.h" #include "source/common/stream_info/filter_state_impl.h" #include "source/extensions/access_loggers/grpc/grpc_access_log_utils.h" + +#if defined(USE_CEL) #include "source/extensions/filters/common/expr/cel_state.h" +#endif // USE_CEL #include "test/mocks/stream_info/mocks.h" @@ -13,8 +16,11 @@ namespace AccessLoggers { namespace GrpcCommon { namespace { +#if defined(USE_CEL) using Filters::Common::Expr::CelStatePrototype; using Filters::Common::Expr::CelStateType; +#endif // USE_CEL + using testing::_; using testing::Return; @@ -58,6 +64,7 @@ TEST(UtilityResponseFlagsToAccessLogResponseFlagsTest, All) { EXPECT_EQ(common_access_log_expected.DebugString(), common_access_log.DebugString()); } +#if defined(USE_CEL) // key is present only in downstream streamInfo's filter state TEST(UtilityExtractCommonAccessLogPropertiesTest, FilterStateFromDownstream) { NiceMock stream_info; @@ -156,6 +163,7 @@ TEST(UtilityExtractCommonAccessLogPropertiesTest, any.UnpackTo(&gotState); EXPECT_EQ(gotState.value(), "value_from_downstream_peer"); } +#endif // USE_CEL } // namespace } // namespace GrpcCommon diff --git a/test/extensions/access_loggers/grpc/tcp_grpc_access_log_integration_test.cc b/test/extensions/access_loggers/grpc/tcp_grpc_access_log_integration_test.cc index 1dc6e24f9dc8..8c7c0de44c14 100644 --- a/test/extensions/access_loggers/grpc/tcp_grpc_access_log_integration_test.cc +++ b/test/extensions/access_loggers/grpc/tcp_grpc_access_log_integration_test.cc @@ -13,7 +13,6 @@ #include "source/common/grpc/common.h" #include "source/common/version/version.h" #include "source/extensions/filters/listener/tls_inspector/tls_inspector.h" -#include "source/extensions/filters/network/rbac/config.h" #include "source/extensions/transport_sockets/tls/context_manager_impl.h" #include "source/extensions/transport_sockets/tls/ssl_socket.h" @@ -22,6 +21,10 @@ #include "test/integration/ssl_utility.h" #include "test/test_common/utility.h" +#if defined(USE_CEL) +#include "source/extensions/filters/network/rbac/config.h" +#endif // USE_CEL + #include "gtest/gtest.h" using testing::AssertionResult; @@ -407,6 +410,7 @@ TEST_P(TcpGrpcAccessLogIntegrationTest, BasicAccessLogFlowWithIntermediateLog) { cleanup(); } +#if defined(USE_CEL) // Test RBAC. TEST_P(TcpGrpcAccessLogIntegrationTest, RBACAccessLogFlow) { config_helper_.addNetworkFilter(R"EOF( @@ -489,6 +493,7 @@ name: envoy.filters.network.rbac cleanup(); } +#endif // USE_CEL // Ssl Terminated by Envoy, no `ja3` fingerprint. TEST_P(TcpGrpcAccessLogIntegrationTest, SslTerminatedNoJA3) { diff --git a/test/extensions/access_loggers/wasm/BUILD b/test/extensions/access_loggers/wasm/BUILD index 47d6aa71e1c9..bb463c360c97 100644 --- a/test/extensions/access_loggers/wasm/BUILD +++ b/test/extensions/access_loggers/wasm/BUILD @@ -22,6 +22,7 @@ envoy_extension_cc_test( "//test/extensions/access_loggers/wasm/test_data:test_cpp.wasm", ]), extension_names = ["envoy.access_loggers.wasm"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/access_loggers/wasm:config", "//test/extensions/access_loggers/wasm/test_data:test_cpp_plugin", diff --git a/test/extensions/bootstrap/wasm/BUILD b/test/extensions/bootstrap/wasm/BUILD index 10932b0cadcd..c655f032da63 100644 --- a/test/extensions/bootstrap/wasm/BUILD +++ b/test/extensions/bootstrap/wasm/BUILD @@ -32,6 +32,7 @@ envoy_extension_cc_test( ]), extension_names = ["envoy.bootstrap.wasm"], external_deps = ["abseil_optional"], + tags = ["skip_on_windows"], deps = [ "//source/common/event:dispatcher_lib", "//source/common/stats:isolated_store_lib", @@ -55,6 +56,7 @@ envoy_extension_cc_test( "//test/extensions/bootstrap/wasm/test_data:http_cpp.wasm", ]), extension_names = ["envoy.bootstrap.wasm"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/bootstrap/wasm:config", "//source/extensions/common/wasm:wasm_lib", @@ -71,6 +73,7 @@ envoy_extension_cc_test( "//test/extensions/bootstrap/wasm/test_data:start_cpp.wasm", ]), extension_names = ["envoy.bootstrap.wasm"], + tags = ["skip_on_windows"], deps = [ "//envoy/registry", "//source/common/stats:isolated_store_lib", @@ -98,6 +101,7 @@ envoy_extension_cc_test_binary( "abseil_optional", "benchmark", ], + tags = ["skip_on_windows"], deps = [ "//source/common/event:dispatcher_lib", "//source/common/stats:isolated_store_lib", diff --git a/test/extensions/common/wasm/BUILD b/test/extensions/common/wasm/BUILD index eaf3b573c9c8..14791f4599cd 100644 --- a/test/extensions/common/wasm/BUILD +++ b/test/extensions/common/wasm/BUILD @@ -21,6 +21,7 @@ envoy_cc_test( data = envoy_select_wasm_rust_tests([ "//test/extensions/common/wasm/test_data:test_rust.wasm", ]), + tags = ["skip_on_windows"], deps = [ "//source/extensions/common/wasm:wasm_lib", "//test/extensions/common/wasm:wasm_runtime", @@ -40,6 +41,7 @@ envoy_cc_test( "//test/extensions/common/wasm/test_data:test_restriction_cpp.wasm", ]), external_deps = ["abseil_optional"], + tags = ["skip_on_windows"], deps = [ "//source/common/common:hex_lib", "//source/common/crypto:utility_lib", @@ -63,6 +65,7 @@ envoy_cc_test( envoy_cc_test( name = "plugin_test", srcs = ["plugin_test.cc"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/common/wasm:wasm_lib", "//test/test_common:environment_lib", @@ -76,6 +79,7 @@ envoy_cc_test_binary( "abseil_optional", "benchmark", ], + tags = ["skip_on_windows"], deps = [ "//source/common/event:dispatcher_lib", "//source/extensions/common/wasm:wasm_lib", @@ -90,6 +94,7 @@ envoy_cc_test_library( name = "wasm_runtime", srcs = ["wasm_runtime.cc"], hdrs = ["wasm_runtime.h"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/wasm_runtime/null:config", "//source/extensions/wasm_runtime/v8:config", @@ -102,6 +107,7 @@ envoy_cc_test_library( envoy_cc_test( name = "wasm_runtime_factory_test", srcs = ["wasm_runtime_factory_test.cc"], + tags = ["skip_on_windows"], deps = [ "//envoy/registry", "//source/extensions/common/wasm:wasm_runtime_factory_interface", @@ -112,6 +118,7 @@ envoy_cc_test( envoy_cc_test( name = "context_test", srcs = ["context_test.cc"], + tags = ["skip_on_windows"], deps = [ "//envoy/common:base_includes", "//source/extensions/common/wasm:wasm_lib", @@ -130,6 +137,7 @@ envoy_cc_test( "-DWASM_USE_CEL_PARSER", ], }), + tags = ["skip_on_windows"], deps = [ "//source/common/network:filter_state_dst_address_lib", "//source/common/tcp_proxy", diff --git a/test/extensions/common/wasm/context_test.cc b/test/extensions/common/wasm/context_test.cc index 2ca56d9c1b69..5e91cc99d03a 100644 --- a/test/extensions/common/wasm/context_test.cc +++ b/test/extensions/common/wasm/context_test.cc @@ -51,6 +51,7 @@ class MockCelMap : public CelMap { return MockIndexOperator(index); } MOCK_METHOD(absl::optional, MockIndexOperator, (CelValue), (const)); + using CelMap::ListKeys; MOCK_METHOD(absl::StatusOr, ListKeys, (), (const, override)); MOCK_METHOD(int, size, (), (const, override)); }; diff --git a/test/extensions/filters/common/expr/BUILD b/test/extensions/filters/common/expr/BUILD index ddda2980b9b8..eed363cec5b3 100644 --- a/test/extensions/filters/common/expr/BUILD +++ b/test/extensions/filters/common/expr/BUILD @@ -17,6 +17,7 @@ envoy_extension_cc_test( name = "context_test", srcs = ["context_test.cc"], extension_names = ["envoy.filters.http.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/common/network:filter_state_dst_address_lib", "//source/common/router:string_accessor_lib", @@ -38,6 +39,7 @@ envoy_extension_cc_test( name = "evaluator_test", srcs = ["evaluator_test.cc"], extension_names = ["envoy.filters.http.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/common/expr:evaluator_lib", "//test/test_common:utility_lib", @@ -58,6 +60,7 @@ envoy_cc_fuzz_test( name = "evaluator_fuzz_test", srcs = ["evaluator_fuzz_test.cc"], corpus = "evaluator_corpus", + tags = ["skip_on_windows"], deps = [ ":evaluator_fuzz_proto_cc_proto", "//source/extensions/filters/common/expr:evaluator_lib", diff --git a/test/extensions/filters/common/rbac/BUILD b/test/extensions/filters/common/rbac/BUILD index f4b8158bf825..3cdc7f4eb9ff 100644 --- a/test/extensions/filters/common/rbac/BUILD +++ b/test/extensions/filters/common/rbac/BUILD @@ -16,6 +16,7 @@ envoy_extension_cc_test( name = "matchers_test", srcs = ["matchers_test.cc"], extension_names = ["envoy.filters.http.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/common/stream_info:filter_state_lib", "//source/extensions/filters/common/expr:evaluator_lib", @@ -34,6 +35,7 @@ envoy_extension_cc_test( name = "engine_impl_test", srcs = ["engine_impl_test.cc"], extension_names = ["envoy.filters.http.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/common/rbac:engine_lib", "//source/extensions/filters/http/rbac:rbac_filter_lib", @@ -53,6 +55,7 @@ envoy_extension_cc_test( name = "utility_test", srcs = ["utility_test.cc"], extension_names = ["envoy.filters.http.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/common/rbac:utility_lib", "//source/extensions/filters/http/rbac:rbac_filter_lib", @@ -65,6 +68,7 @@ envoy_extension_cc_mock( name = "engine_mocks", hdrs = ["mocks.h"], extension_names = ["envoy.filters.http.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/common/rbac:engine_lib", "@envoy_api//envoy/config/rbac/v3:pkg_cc_proto", diff --git a/test/extensions/filters/http/composite/BUILD b/test/extensions/filters/http/composite/BUILD index fd0777e78c5a..4b826772d3af 100644 --- a/test/extensions/filters/http/composite/BUILD +++ b/test/extensions/filters/http/composite/BUILD @@ -38,9 +38,6 @@ envoy_extension_cc_test( "//source/common/http/match_delegate:config", "//source/extensions/filters/http/composite:config", "//source/extensions/filters/http/composite:filter_lib", - "//source/extensions/matching/http/cel_input:cel_input_lib", - "//source/extensions/matching/input_matchers/cel_matcher:cel_matcher_lib", - "//source/extensions/matching/input_matchers/cel_matcher:config", "//test/common/grpc:grpc_client_integration_lib", "//test/common/http:common_lib", "//test/integration:http_integration_lib", diff --git a/test/extensions/filters/http/rate_limit_quota/BUILD b/test/extensions/filters/http/rate_limit_quota/BUILD index 7dea53a8460e..370231d06d9e 100644 --- a/test/extensions/filters/http/rate_limit_quota/BUILD +++ b/test/extensions/filters/http/rate_limit_quota/BUILD @@ -17,6 +17,7 @@ envoy_extension_cc_mock( name = "mocks", hdrs = ["mocks.h"], extension_names = ["envoy.filters.http.rate_limit_quota"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/http/rate_limit_quota", "@envoy_api//envoy/service/rate_limit_quota/v3:pkg_cc_proto", @@ -28,6 +29,7 @@ envoy_extension_cc_test( size = "small", srcs = ["config_test.cc"], extension_names = ["envoy.filters.http.rate_limit_quota"], + tags = ["skip_on_windows"], deps = [ "//source/common/http:message_lib", "//source/extensions/filters/http/rate_limit_quota:config", @@ -42,6 +44,7 @@ envoy_extension_cc_test( size = "small", srcs = ["filter_test.cc"], extension_names = ["envoy.filters.http.rate_limit_quota"], + tags = ["skip_on_windows"], deps = [ ":client_test_utils", ":test_utils", @@ -62,6 +65,7 @@ envoy_extension_cc_test( size = "small", srcs = ["client_test.cc"], extension_names = ["envoy.filters.http.rate_limit_quota"], + tags = ["skip_on_windows"], deps = [ ":client_test_utils", ], @@ -71,6 +75,7 @@ envoy_extension_cc_test_library( name = "client_test_utils", hdrs = ["client_test_utils.h"], extension_names = ["envoy.filters.http.rate_limit_quota"], + tags = ["skip_on_windows"], deps = [ ":mocks", "//source/common/http:header_map_lib", @@ -89,6 +94,7 @@ envoy_extension_cc_test_library( name = "test_utils", hdrs = ["test_utils.h"], extension_names = ["envoy.filters.http.rate_limit_quota"], + tags = ["skip_on_windows"], deps = [ ], ) @@ -101,6 +107,7 @@ envoy_extension_cc_test( shard_count = 2, tags = [ "cpu:3", + "skip_on_windows", ], deps = [ ":test_utils", diff --git a/test/extensions/filters/http/rbac/BUILD b/test/extensions/filters/http/rbac/BUILD index 92f3b3eb0067..6195d9cd4fe5 100644 --- a/test/extensions/filters/http/rbac/BUILD +++ b/test/extensions/filters/http/rbac/BUILD @@ -16,6 +16,7 @@ envoy_extension_cc_test( name = "config_test", srcs = ["config_test.cc"], extension_names = ["envoy.filters.http.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/http/rbac:config", "//test/mocks/server:factory_context_mocks", @@ -29,6 +30,7 @@ envoy_extension_cc_test( name = "rbac_filter_test", srcs = ["rbac_filter_test.cc"], extension_names = ["envoy.filters.http.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/common/rbac:utility_lib", "//source/extensions/filters/http/rbac:rbac_filter_lib", @@ -52,6 +54,7 @@ envoy_extension_cc_test( srcs = ["rbac_filter_integration_test.cc"], extension_names = ["envoy.filters.http.rbac"], shard_count = 2, + tags = ["skip_on_windows"], deps = [ "//source/extensions/clusters/dynamic_forward_proxy:cluster", "//source/extensions/filters/http/dynamic_forward_proxy:config", @@ -68,6 +71,7 @@ envoy_extension_cc_mock( name = "route_config_mocks", hdrs = ["mocks.h"], extension_names = ["envoy.filters.http.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/common/rbac:utility_lib", "//source/extensions/filters/http/rbac:rbac_filter_lib", diff --git a/test/extensions/filters/http/wasm/BUILD b/test/extensions/filters/http/wasm/BUILD index cfbddf2e7712..2b4f39eb4631 100644 --- a/test/extensions/filters/http/wasm/BUILD +++ b/test/extensions/filters/http/wasm/BUILD @@ -37,7 +37,10 @@ envoy_extension_cc_test( ]), extension_names = ["envoy.filters.http.wasm"], shard_count = 50, - tags = ["cpu:4"], + tags = [ + "cpu:4", + "skip_on_windows", + ], deps = [ "//source/common/http:message_lib", "//source/extensions/filters/http/wasm:wasm_filter_lib", @@ -59,6 +62,7 @@ envoy_extension_cc_test( ]), extension_names = ["envoy.filters.http.wasm"], shard_count = 16, + tags = ["skip_on_windows"], deps = [ "//source/common/common:base64_lib", "//source/common/common:hex_lib", diff --git a/test/extensions/filters/network/rbac/BUILD b/test/extensions/filters/network/rbac/BUILD index 5475ef490c7e..7264d1596a61 100644 --- a/test/extensions/filters/network/rbac/BUILD +++ b/test/extensions/filters/network/rbac/BUILD @@ -15,6 +15,7 @@ envoy_extension_cc_test( name = "config_test", srcs = ["config_test.cc"], extension_names = ["envoy.filters.network.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/network/rbac:config", "//test/mocks/server:factory_context_mocks", @@ -27,6 +28,7 @@ envoy_extension_cc_test( name = "filter_test", srcs = ["filter_test.cc"], extension_names = ["envoy.filters.network.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/common/rbac:utility_lib", "//source/extensions/filters/network:well_known_names", @@ -45,6 +47,7 @@ envoy_extension_cc_test( size = "large", srcs = ["integration_test.cc"], extension_names = ["envoy.filters.network.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/network/echo:config", "//source/extensions/filters/network/rbac:config", diff --git a/test/extensions/filters/network/wasm/BUILD b/test/extensions/filters/network/wasm/BUILD index 840a0f7afcbd..93069c892003 100644 --- a/test/extensions/filters/network/wasm/BUILD +++ b/test/extensions/filters/network/wasm/BUILD @@ -24,6 +24,7 @@ envoy_extension_cc_test( "//test/extensions/filters/network/wasm/test_data:test_cpp.wasm", ]), extension_names = ["envoy.filters.network.wasm"], + tags = ["skip_on_windows"], deps = [ "//source/common/common:base64_lib", "//source/common/common:hex_lib", @@ -51,6 +52,7 @@ envoy_extension_cc_test( "//test/extensions/filters/network/wasm/test_data:resume_call_rust.wasm", ]), extension_names = ["envoy.filters.network.wasm"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/network/wasm:wasm_filter_lib", "//test/extensions/common/wasm:wasm_runtime", diff --git a/test/extensions/formatter/cel/BUILD b/test/extensions/formatter/cel/BUILD index d1160a3b0188..e441c302878a 100644 --- a/test/extensions/formatter/cel/BUILD +++ b/test/extensions/formatter/cel/BUILD @@ -21,6 +21,7 @@ envoy_extension_cc_test( ], }), extension_names = ["envoy.formatter.cel"], + tags = ["skip_on_windows"], deps = [ "//source/common/formatter:substitution_formatter_lib", "//source/common/json:json_loader_lib", diff --git a/test/extensions/matching/input_matchers/cel_matcher/BUILD b/test/extensions/matching/input_matchers/cel_matcher/BUILD index a5a2f50ca4fa..74f2ce3473a2 100644 --- a/test/extensions/matching/input_matchers/cel_matcher/BUILD +++ b/test/extensions/matching/input_matchers/cel_matcher/BUILD @@ -15,12 +15,14 @@ envoy_package() envoy_cc_test_library( name = "cel_matcher_test_lib", hdrs = ["cel_matcher_test.h"], + tags = ["skip_on_windows"], ) envoy_extension_cc_test( name = "cel_matcher_test", srcs = ["cel_matcher_test.cc"], extension_names = ["envoy.matching.matchers.cel_matcher"], + tags = ["skip_on_windows"], deps = [ ":cel_matcher_test_lib", "//source/common/matcher:matcher_lib", diff --git a/test/extensions/rate_limit_descriptors/expr/BUILD b/test/extensions/rate_limit_descriptors/expr/BUILD index 2107c282c88b..f6f7ad16841d 100644 --- a/test/extensions/rate_limit_descriptors/expr/BUILD +++ b/test/extensions/rate_limit_descriptors/expr/BUILD @@ -21,6 +21,7 @@ envoy_extension_cc_test( ], }), extension_names = ["envoy.rate_limit_descriptors.expr"], + tags = ["skip_on_windows"], deps = [ "//source/common/protobuf:utility_lib", "//source/common/router:router_ratelimit_lib", diff --git a/test/extensions/stats_sinks/wasm/BUILD b/test/extensions/stats_sinks/wasm/BUILD index 8f40393ed055..9ad8c633cfa0 100644 --- a/test/extensions/stats_sinks/wasm/BUILD +++ b/test/extensions/stats_sinks/wasm/BUILD @@ -22,6 +22,7 @@ envoy_extension_cc_test( "//test/extensions/stats_sinks/wasm/test_data:test_context_cpp.wasm", ]), extension_names = ["envoy.stat_sinks.wasm"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/stat_sinks/wasm:config", "//test/extensions/common/wasm:wasm_runtime", @@ -39,6 +40,7 @@ envoy_extension_cc_test( ]), extension_names = ["envoy.stat_sinks.wasm"], external_deps = ["abseil_optional"], + tags = ["skip_on_windows"], deps = [ "//source/common/stats:stats_lib", "//source/extensions/common/wasm:wasm_lib", diff --git a/test/integration/BUILD b/test/integration/BUILD index 39f09bce4476..51937089c341 100644 --- a/test/integration/BUILD +++ b/test/integration/BUILD @@ -359,6 +359,21 @@ envoy_cc_test_binary( ], ) +envoy_cc_test_binary( + name = "hotrestart_small_main", + srcs = ["hotrestart_main.cc"], + external_deps = [ + "abseil_symbolize", + ], + deps = [ + "//source/exe:main_common_lib", + "//source/exe:platform_impl_lib", + "//source/exe:process_wide_lib", + "//source/exe:stripped_main_base_lib", + "//source/extensions/listener_managers/validation_listener_manager:validation_listener_manager_lib", + ], +) + envoy_py_test( name = "hotrestart_handoff_test", size = "medium", @@ -413,14 +428,15 @@ envoy_sh_test( ) envoy_sh_test( - name = "run_envoy_test", + name = "run_envoy_small_test", size = "large", srcs = ["run_envoy_test.sh"], - cc_binary = [":hotrestart_main"], + cc_binary = [":hotrestart_small_main"], data = [ "test_utility.sh", "//test/config/integration:server_config_files", ], + tags = ["skip_on_windows"], ) envoy_cc_test( diff --git a/test/integration/admin_html/BUILD b/test/integration/admin_html/BUILD index 1215673070f8..89891acf214f 100644 --- a/test/integration/admin_html/BUILD +++ b/test/integration/admin_html/BUILD @@ -45,7 +45,10 @@ envoy_sh_test( # curl: (3) URL using bad/illegal format or missing URL # # This seems fixable, if someone is so inclined. - tags = ["skip_on_windows"], + tags = [ + "nocoverage", + "skip_on_windows", + ], ) filegroup( diff --git a/test/integration/run_envoy_test.sh b/test/integration/run_envoy_test.sh index 1b24f51fc1b9..5d0e63cfaf62 100755 --- a/test/integration/run_envoy_test.sh +++ b/test/integration/run_envoy_test.sh @@ -1,6 +1,6 @@ #!/bin/bash -export ENVOY_BIN="${TEST_SRCDIR}/envoy/test/integration/hotrestart_main" +export ENVOY_BIN="${TEST_SRCDIR}/envoy/test/integration/hotrestart_small_main" # shellcheck source=test/integration/test_utility.sh source "${TEST_SRCDIR}/envoy/test/integration/test_utility.sh" @@ -18,6 +18,12 @@ function expect_fail_with_error() { check grep "$expected_error" "$log" } +function expect_ok() { + ${ENVOY_BIN} --use-dynamic-base-id "$@" + EXIT_CODE=$? + check [ $EXIT_CODE -eq 0 ] +} + start_test "Launching envoy with a bogus command line flag." expect_fail_with_error "PARSE ERROR: Argument: --bogus-flag" --bogus-flag @@ -40,3 +46,12 @@ expect_fail_with_error "error: invalid log level specified" --component-log-leve start_test "Launching envoy with invalid component." expect_fail_with_error "error: invalid component specified" --component-log-level foo:debug + +start_test "Launching envoy with empty config and validate." +expect_ok -c "${TEST_SRCDIR}/envoy/test/config/integration/empty.yaml" --mode validate + +start_test "Launching envoy with empty config." +run_in_background_saving_pid "${ENVOY_BIN}" -c "${TEST_SRCDIR}/envoy/test/config/integration/empty.yaml" +sleep 3 +kill "${BACKGROUND_PID}" +wait "${BACKGROUND_PID}"