diff --git a/bazel/external/quiche.BUILD b/bazel/external/quiche.BUILD new file mode 100644 index 0000000000000..d2c138a742a3e --- /dev/null +++ b/bazel/external/quiche.BUILD @@ -0,0 +1,85 @@ +licenses(["notice"]) # Apache 2 + +# QUICHE is Google's implementation of QUIC and related protocols. It is the +# same code used in Chromium and Google's servers, but packaged in a form that +# is intended to be easier to incorporate into third-party projects. +# +# QUICHE code falls into three groups: +# 1. Platform-independent code. Most QUICHE code is in this category. +# 2. APIs and type aliases to platform-dependent code/types, referenced by code +# in group 1. This group is called the "Platform API". +# 3. Definitions of types declared in group 2. This group is called the +# "Platform impl", and must be provided by the codebase that embeds QUICHE. +# +# Concretely, header files in group 2 (the Platform API) #include header and +# source files in group 3 (the Platform impl). Unfortunately, QUICHE does not +# yet provide a built-in way to customize this dependency, e.g. to override the +# directory or namespace in which Platform impl types are defined. Hence the +# gross hacks in this file. +# +# Transformations to QUICHE tarball performed here: +# - Move subtree under quiche/ base dir, for clarity in #include statements. +# - Rewrite include directives for platform/impl files. +# +# The mechanics of this will change as QUICHE evolves, supplies its own Bazel +# buildfiles, and provides a built-in way to override platform impl directory +# location. However, the end result (QUICHE files placed under +# quiche/{http2,quic,spdy}/, with the Envoy-specific implementation of the +# QUICHE platform APIs in //source/extensions/quic_listeners/quiche/platform/, +# should remain largely the same. + +src_files = glob([ + "**/*.h", + "**/*.c", + "**/*.cc", + "**/*.inc", + "**/*.proto", +]) + +# TODO(mpwarres): remove use of sed once QUICHE provides a cleaner way to +# override platform impl directory location. +genrule( + name = "quiche_files", + srcs = src_files, + outs = ["quiche/" + f for f in src_files], + cmd = "\n".join( + ["sed -e '/^#include/ s!net/[^/]*/platform/impl/!extensions/quic_listeners/quiche/platform/!' $(location %s) > $(location :%s)" % ( + f, + "quiche/" + f, + ) for f in src_files], + ), + visibility = ["//visibility:private"], +) + +# Note: in dependencies below that reference Envoy build targets in the main +# repository (particularly for QUICHE platform libs), use '@' instead of +# '@envoy' as the repository identifier. Otherwise, Bazel generates duplicate +# object files for the same build target (one under +# bazel-out/.../bin/external/, and one under bazel-out/.../bin/), eventually +# resulting in link-time errors. + +cc_library( + name = "http2_platform", + hdrs = [ + "quiche/http2/platform/api/http2_arraysize.h", + "quiche/http2/platform/api/http2_bug_tracker.h", + "quiche/http2/platform/api/http2_containers.h", + "quiche/http2/platform/api/http2_estimate_memory_usage.h", + "quiche/http2/platform/api/http2_export.h", + "quiche/http2/platform/api/http2_flag_utils.h", + "quiche/http2/platform/api/http2_flags.h", + "quiche/http2/platform/api/http2_macros.h", + "quiche/http2/platform/api/http2_mock_log.h", + "quiche/http2/platform/api/http2_optional.h", + "quiche/http2/platform/api/http2_ptr_util.h", + "quiche/http2/platform/api/http2_reconstruct_object.h", + "quiche/http2/platform/api/http2_string.h", + "quiche/http2/platform/api/http2_string_piece.h", + "quiche/http2/platform/api/http2_string_utils.h", + "quiche/http2/platform/api/http2_test_helpers.h", + ], + visibility = ["//visibility:public"], + deps = [ + "@envoy//source/extensions/quic_listeners/quiche/platform:http2_platform_impl_lib", + ], +) diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index df2c74d894e5a..6e5dc73d41d02 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -298,6 +298,7 @@ def envoy_dependencies(path = "@envoy_deps//", skip_targets = []): _com_google_googletest() _com_google_protobuf() _com_github_envoyproxy_sqlparser() + _com_googlesource_quiche() # Used for bundling gcovr into a relocatable .par file. _repository_impl("subpar") @@ -550,6 +551,19 @@ def _com_google_protobuf(): actual = "@com_google_protobuf//util/python:python_headers", ) +def _com_googlesource_quiche(): + _repository_impl( + name = "com_googlesource_quiche", + build_file = "@envoy//bazel/external:quiche.BUILD", + ) + + # TODO: add bindings for quiche_quic_platform and quiche_spdy_platform once + # those build targets have been defined. + native.bind( + name = "quiche_http2_platform", + actual = "@com_googlesource_quiche//:http2_platform", + ) + def _com_github_grpc_grpc(): _repository_impl("com_github_grpc_grpc") diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index dfb091dc0c985..c68fe2dcfb3d9 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -196,4 +196,9 @@ REPOSITORY_LOCATIONS = dict( strip_prefix = "subpar-1.3.0", urls = ["https://github.com/google/subpar/archive/1.3.0.tar.gz"], ), + com_googlesource_quiche = dict( + # Static snapshot of https://quiche.googlesource.com/quiche/+archive/c9b2cecd1d005893114a03c101532017ddfa12cb.tar.gz + sha256 = "c8faea835132103d574cc2769a58e244bee3de02669471330a174f2ffae6fcc3", + urls = ["https://storage.googleapis.com/quiche-envoy-integration/c9b2cecd1d005893114a03c101532017ddfa12cb.tar.gz"], + ), ) diff --git a/source/extensions/quic_listeners/quiche/BUILD b/source/extensions/quic_listeners/quiche/BUILD new file mode 100644 index 0000000000000..17444da358f8c --- /dev/null +++ b/source/extensions/quic_listeners/quiche/BUILD @@ -0,0 +1,18 @@ +licenses(["notice"]) # Apache 2 + +load( + "//bazel:envoy_build_system.bzl", + "envoy_cc_library", + "envoy_package", +) + +envoy_package() + +# Placeholder library to verify/illustrate depending on a QUICHE build target. +# TODO(mpwarres): remove once real build rules added here. +envoy_cc_library( + name = "dummy_lib", + srcs = ["dummy.cc"], + hdrs = ["dummy.h"], + external_deps = ["quiche_http2_platform"], +) diff --git a/source/extensions/quic_listeners/quiche/dummy.cc b/source/extensions/quic_listeners/quiche/dummy.cc new file mode 100644 index 0000000000000..f09ec04b42bc3 --- /dev/null +++ b/source/extensions/quic_listeners/quiche/dummy.cc @@ -0,0 +1,17 @@ +#include "extensions/quic_listeners/quiche/dummy.h" + +using http2::Http2String; + +namespace Envoy { +namespace Extensions { +namespace QuicListeners { +namespace Quiche { + +// Placeholder use of a QUICHE platform type. +// TODO(mpwarres): remove once real uses of QUICHE platform added. +Http2String moreCowbell(const Http2String& s) { return s + " cowbell"; } + +} // namespace Quiche +} // namespace QuicListeners +} // namespace Extensions +} // namespace Envoy diff --git a/source/extensions/quic_listeners/quiche/dummy.h b/source/extensions/quic_listeners/quiche/dummy.h new file mode 100644 index 0000000000000..c57b89486de3f --- /dev/null +++ b/source/extensions/quic_listeners/quiche/dummy.h @@ -0,0 +1,17 @@ +#pragma once + +#include "quiche/http2/platform/api/http2_string.h" + +namespace Envoy { +namespace Extensions { +namespace QuicListeners { +namespace Quiche { + +// Placeholder use of a QUICHE platform type. +// TODO(mpwarres): remove once real uses of QUICHE platform added. +http2::Http2String moreCowbell(const http2::Http2String& s); + +} // namespace Quiche +} // namespace QuicListeners +} // namespace Extensions +} // namespace Envoy diff --git a/source/extensions/quic_listeners/quiche/platform/BUILD b/source/extensions/quic_listeners/quiche/platform/BUILD new file mode 100644 index 0000000000000..693bbeae24433 --- /dev/null +++ b/source/extensions/quic_listeners/quiche/platform/BUILD @@ -0,0 +1,45 @@ +licenses(["notice"]) # Apache 2 + +load( + "//bazel:envoy_build_system.bzl", + "envoy_cc_library", + "envoy_package", +) + +envoy_package() + +# Build targets in this package are part of the QUICHE platform implementation, +# are are not to be consumed or referenced directly by other Envoy code. The +# only consumers should be build rules under @com_googlesource_quiche//..., and +# tests. In a monorepo, this would be enforced via visibility attribute, but +# Bazel does not support limiting visibility to specific external dependencies. + +# TODO: add build targets for quic_platform_impl_lib and spdy_platform_impl_lib, +# as _impl.* files for those are added. + +envoy_cc_library( + name = "http2_platform_impl_lib", + hdrs = [ + "http2_arraysize_impl.h", + "http2_bug_tracker_impl.h", + "http2_containers_impl.h", + "http2_estimate_memory_usage_impl.h", + "http2_export_impl.h", + "http2_flag_utils_impl.h", + "http2_flags_impl.h", + "http2_macros_impl.h", + "http2_mock_log_impl.h", + "http2_optional_impl.h", + "http2_ptr_util_impl.h", + "http2_reconstruct_object_impl.h", + "http2_string_impl.h", + "http2_string_piece_impl.h", + "http2_string_utils_impl.h", + "http2_test_helpers_impl.h", + ], + external_deps = [ + "abseil_base", + "abseil_optional", + ], + visibility = ["//visibility:public"], +) diff --git a/source/extensions/quic_listeners/quiche/platform/http2_arraysize_impl.h b/source/extensions/quic_listeners/quiche/platform/http2_arraysize_impl.h new file mode 100644 index 0000000000000..edeaf02f108dd --- /dev/null +++ b/source/extensions/quic_listeners/quiche/platform/http2_arraysize_impl.h @@ -0,0 +1,11 @@ +#pragma once + +#include "absl/base/macros.h" + +// NOLINT(namespace-envoy) + +// This file is part of the QUICHE platform implementation, and is not to be +// consumed or referenced directly by other Envoy code. It serves purely as a +// porting layer for QUICHE. + +#define HTTP2_ARRAYSIZE_IMPL(x) ABSL_ARRAYSIZE(x) diff --git a/source/extensions/quic_listeners/quiche/platform/http2_bug_tracker_impl.h b/source/extensions/quic_listeners/quiche/platform/http2_bug_tracker_impl.h new file mode 100644 index 0000000000000..e346ce2b7f266 --- /dev/null +++ b/source/extensions/quic_listeners/quiche/platform/http2_bug_tracker_impl.h @@ -0,0 +1,13 @@ +#pragma once + +// NOLINT(namespace-envoy) + +// This file is part of the QUICHE platform implementation, and is not to be +// consumed or referenced directly by other Envoy code. It serves purely as a +// porting layer for QUICHE. + +// TODO: implement + +#define HTTP2_BUG_IMPL 0 +#define HTTP2_BUG_IF_IMPL 0 +#define FLAGS_http2_always_log_bugs_for_tests_IMPL 0 diff --git a/source/extensions/quic_listeners/quiche/platform/http2_containers_impl.h b/source/extensions/quic_listeners/quiche/platform/http2_containers_impl.h new file mode 100644 index 0000000000000..e43ec40bfc13a --- /dev/null +++ b/source/extensions/quic_listeners/quiche/platform/http2_containers_impl.h @@ -0,0 +1,15 @@ +#pragma once + +#include + +// NOLINT(namespace-envoy) + +// This file is part of the QUICHE platform implementation, and is not to be +// consumed or referenced directly by other Envoy code. It serves purely as a +// porting layer for QUICHE. + +namespace http2 { + +template using Http2DequeImpl = std::deque; + +} // namespace http2 diff --git a/source/extensions/quic_listeners/quiche/platform/http2_estimate_memory_usage_impl.h b/source/extensions/quic_listeners/quiche/platform/http2_estimate_memory_usage_impl.h new file mode 100644 index 0000000000000..7f7617f53b290 --- /dev/null +++ b/source/extensions/quic_listeners/quiche/platform/http2_estimate_memory_usage_impl.h @@ -0,0 +1,15 @@ +#pragma once + +#include + +// NOLINT(namespace-envoy) + +// This file is part of the QUICHE platform implementation, and is not to be +// consumed or referenced directly by other Envoy code. It serves purely as a +// porting layer for QUICHE. + +namespace http2 { + +template size_t Http2EstimateMemoryUsageImpl(const T& /*object*/) { return 0; } + +} // namespace http2 diff --git a/source/extensions/quic_listeners/quiche/platform/http2_export_impl.h b/source/extensions/quic_listeners/quiche/platform/http2_export_impl.h new file mode 100644 index 0000000000000..802f6fb591fd1 --- /dev/null +++ b/source/extensions/quic_listeners/quiche/platform/http2_export_impl.h @@ -0,0 +1,10 @@ +#pragma once + +// NOLINT(namespace-envoy) + +// This file is part of the QUICHE platform implementation, and is not to be +// consumed or referenced directly by other Envoy code. It serves purely as a +// porting layer for QUICHE. + +#define HTTP2_EXPORT +#define HTTP2_EXPORT_PRIVATE diff --git a/source/extensions/quic_listeners/quiche/platform/http2_flag_utils_impl.h b/source/extensions/quic_listeners/quiche/platform/http2_flag_utils_impl.h new file mode 100644 index 0000000000000..550b91951484e --- /dev/null +++ b/source/extensions/quic_listeners/quiche/platform/http2_flag_utils_impl.h @@ -0,0 +1,11 @@ +#pragma once + +// NOLINT(namespace-envoy) + +// This file is part of the QUICHE platform implementation, and is not to be +// consumed or referenced directly by other Envoy code. It serves purely as a +// porting layer for QUICHE. + +#define HTTP2_RELOADABLE_FLAG_COUNT_IMPL(flag) \ + do { \ + } while (0) diff --git a/source/extensions/quic_listeners/quiche/platform/http2_flags_impl.h b/source/extensions/quic_listeners/quiche/platform/http2_flags_impl.h new file mode 100644 index 0000000000000..d7c503ed95953 --- /dev/null +++ b/source/extensions/quic_listeners/quiche/platform/http2_flags_impl.h @@ -0,0 +1,12 @@ +#pragma once + +// NOLINT(namespace-envoy) + +// This file is part of the QUICHE platform implementation, and is not to be +// consumed or referenced directly by other Envoy code. It serves purely as a +// porting layer for QUICHE. + +// TODO: implement + +#define GetHttp2ReloadableFlagImpl(flag) 0 +#define SetHttp2ReloadableFlagImpl(flag, value) 0 diff --git a/source/extensions/quic_listeners/quiche/platform/http2_macros_impl.h b/source/extensions/quic_listeners/quiche/platform/http2_macros_impl.h new file mode 100644 index 0000000000000..3d7df5563e9f1 --- /dev/null +++ b/source/extensions/quic_listeners/quiche/platform/http2_macros_impl.h @@ -0,0 +1,15 @@ +#pragma once + +#include "absl/base/macros.h" + +// NOLINT(namespace-envoy) + +// This file is part of the QUICHE platform implementation, and is not to be +// consumed or referenced directly by other Envoy code. It serves purely as a +// porting layer for QUICHE. + +#define HTTP2_FALLTHROUGH_IMPL ABSL_FALLTHROUGH_INTENDED +#define HTTP2_DIE_IF_NULL_IMPL(ptr) ABSL_DIE_IF_NULL(ptr) + +// TODO: implement +#define HTTP2_UNREACHABLE_IMPL() 0 diff --git a/source/extensions/quic_listeners/quiche/platform/http2_mock_log_impl.h b/source/extensions/quic_listeners/quiche/platform/http2_mock_log_impl.h new file mode 100644 index 0000000000000..1a5518165e586 --- /dev/null +++ b/source/extensions/quic_listeners/quiche/platform/http2_mock_log_impl.h @@ -0,0 +1,13 @@ +#pragma once + +// NOLINT(namespace-envoy) + +// This file is part of the QUICHE platform implementation, and is not to be +// consumed or referenced directly by other Envoy code. It serves purely as a +// porting layer for QUICHE. + +// TODO: implement + +#define CREATE_HTTP2_MOCK_LOG_IMPL(log) 0 +#define EXPECT_HTTP2_LOG_CALL_IMPL(log) 0 +#define EXPECT_HTTP2_LOG_CALL_CONTAINS_IMPL(log, level, content) 0 diff --git a/source/extensions/quic_listeners/quiche/platform/http2_optional_impl.h b/source/extensions/quic_listeners/quiche/platform/http2_optional_impl.h new file mode 100644 index 0000000000000..5f1cd8b30b952 --- /dev/null +++ b/source/extensions/quic_listeners/quiche/platform/http2_optional_impl.h @@ -0,0 +1,15 @@ +#pragma once + +#include "absl/types/optional.h" + +// NOLINT(namespace-envoy) + +// This file is part of the QUICHE platform implementation, and is not to be +// consumed or referenced directly by other Envoy code. It serves purely as a +// porting layer for QUICHE. + +namespace http2 { + +template using Http2OptionalImpl = absl::optional; + +} // namespace http2 diff --git a/source/extensions/quic_listeners/quiche/platform/http2_ptr_util_impl.h b/source/extensions/quic_listeners/quiche/platform/http2_ptr_util_impl.h new file mode 100644 index 0000000000000..7ef0bd5828ae0 --- /dev/null +++ b/source/extensions/quic_listeners/quiche/platform/http2_ptr_util_impl.h @@ -0,0 +1,18 @@ +#pragma once + +#include +#include + +// NOLINT(namespace-envoy) + +// This file is part of the QUICHE platform implementation, and is not to be +// consumed or referenced directly by other Envoy code. It serves purely as a +// porting layer for QUICHE. + +namespace http2 { + +template std::unique_ptr Http2MakeUniqueImpl(Args&&... args) { + return std::make_unique(std::forward(args)...); +} + +} // namespace http2 diff --git a/source/extensions/quic_listeners/quiche/platform/http2_reconstruct_object_impl.h b/source/extensions/quic_listeners/quiche/platform/http2_reconstruct_object_impl.h new file mode 100644 index 0000000000000..2ee229d3874e5 --- /dev/null +++ b/source/extensions/quic_listeners/quiche/platform/http2_reconstruct_object_impl.h @@ -0,0 +1,32 @@ +#pragma once + +#include + +// NOLINT(namespace-envoy) + +// This file is part of the QUICHE platform implementation, and is not to be +// consumed or referenced directly by other Envoy code. It serves purely as a +// porting layer for QUICHE. + +// TODO: implement + +namespace http2 { +namespace test { + +class Http2Random; + +void MarkMemoryUninitialized(void* /*ptr*/, size_t /*num_bytes*/) {} +void MarkMemoryUninitialized(void* /*ptr*/, size_t /*num_bytes*/, Http2Random* /*rng*/) {} + +template void MarkObjectUninitialized(T* /*ptr*/) {} +template void MarkObjectUninitialized(T* /*ptr*/, Http2Random* /*rng*/) {} + +template void MarkArrayUninitialized(T (&/*array*/)[N]) {} +template void MarkArrayUninitialized(T (&/*array*/)[N], Http2Random* /*rng*/) {} + +template +void Http2ReconstructObjectImpl(T* /*ptr*/, Http2Random* /*rng*/, Args&&... /*args*/) {} +template void Http2DefaultReconstructObjectImpl(T* /*ptr*/, Http2Random* /*rng*/) {} + +} // namespace test +} // namespace http2 diff --git a/source/extensions/quic_listeners/quiche/platform/http2_string_impl.h b/source/extensions/quic_listeners/quiche/platform/http2_string_impl.h new file mode 100644 index 0000000000000..fc54f8938f5c8 --- /dev/null +++ b/source/extensions/quic_listeners/quiche/platform/http2_string_impl.h @@ -0,0 +1,15 @@ +#pragma once + +#include + +// NOLINT(namespace-envoy) + +// This file is part of the QUICHE platform implementation, and is not to be +// consumed or referenced directly by other Envoy code. It serves purely as a +// porting layer for QUICHE. + +namespace http2 { + +using Http2StringImpl = std::string; + +} // namespace http2 diff --git a/source/extensions/quic_listeners/quiche/platform/http2_string_piece_impl.h b/source/extensions/quic_listeners/quiche/platform/http2_string_piece_impl.h new file mode 100644 index 0000000000000..711372c021dd2 --- /dev/null +++ b/source/extensions/quic_listeners/quiche/platform/http2_string_piece_impl.h @@ -0,0 +1,15 @@ +#pragma once + +#include "absl/strings/string_view.h" + +// NOLINT(namespace-envoy) + +// This file is part of the QUICHE platform implementation, and is not to be +// consumed or referenced directly by other Envoy code. It serves purely as a +// porting layer for QUICHE. + +namespace http2 { + +using Http2StringPieceImpl = absl::string_view; + +} // namespace http2 diff --git a/source/extensions/quic_listeners/quiche/platform/http2_string_utils_impl.h b/source/extensions/quic_listeners/quiche/platform/http2_string_utils_impl.h new file mode 100644 index 0000000000000..4465d50e109b2 --- /dev/null +++ b/source/extensions/quic_listeners/quiche/platform/http2_string_utils_impl.h @@ -0,0 +1,54 @@ +#pragma once + +#include + +// The following includes should be: +// +// #include "extensions/quic_listeners/quiche/platform/http2_string_impl.h" +// #include "extensions/quic_listeners/quiche/platform/http2_string_piece_impl.h" +// +// However, for some reason, bazel.clang_tidy cannot resolve the files when specified this way. +// TODO(mpw): fix includes to use full paths. +#include "http2_string_impl.h" +#include "http2_string_piece_impl.h" + +// NOLINT(namespace-envoy) + +// This file is part of the QUICHE platform implementation, and is not to be +// consumed or referenced directly by other Envoy code. It serves purely as a +// porting layer for QUICHE. + +// TODO: implement + +namespace http2 { + +template inline Http2StringImpl Http2StrCatImpl(const Args&... /*args*/) { + return Http2StringImpl(); +} + +template +inline void Http2StrAppendImpl(Http2StringImpl* /*output*/, const Args&... /*args*/) {} + +template inline Http2StringImpl Http2StringPrintfImpl(const Args&... /*args*/) { + return Http2StringImpl(); +} + +inline Http2StringImpl Http2HexEncodeImpl(const void* /*bytes*/, size_t /*size*/) { + return Http2StringImpl(); +} + +inline Http2StringImpl Http2HexDecodeImpl(Http2StringPieceImpl /*data*/) { + return Http2StringImpl(); +} + +inline Http2StringImpl Http2HexDumpImpl(Http2StringPieceImpl /*data*/) { return Http2StringImpl(); } + +inline Http2StringImpl Http2HexEscapeImpl(Http2StringPieceImpl /*data*/) { + return Http2StringImpl(); +} + +template inline Http2StringImpl Http2HexImpl(Number /*number*/) { + return Http2StringImpl(); +} + +} // namespace http2 diff --git a/source/extensions/quic_listeners/quiche/platform/http2_test_helpers_impl.h b/source/extensions/quic_listeners/quiche/platform/http2_test_helpers_impl.h new file mode 100644 index 0000000000000..85d72e33ce0b6 --- /dev/null +++ b/source/extensions/quic_listeners/quiche/platform/http2_test_helpers_impl.h @@ -0,0 +1,24 @@ +#pragma once + +// NOLINT(namespace-envoy) + +// This file is part of the QUICHE platform implementation, and is not to be +// consumed or referenced directly by other Envoy code. It serves purely as a +// porting layer for QUICHE. + +// TODO: implement + +#define VERIFY_AND_RETURN_SUCCESS(expression) 0 +#define VERIFY_TRUE(condition) 0 +#define VERIFY_FALSE(condition) 0 +#define VERIFY_THAT(value, matcher) 0 +#define VERIFY_EQ(val1, val2) 0 +#define VERIFY_NE(val1, val2) 0 +#define VERIFY_GT(val1, val2) 0 +#define VERIFY_LT(val1, val2) 0 +#define VERIFY_GE(val1, val2) 0 +#define VERIFY_LE(val1, val2) 0 +#define VERIFY_DOUBLE_EQ(val1, val2) 0 +#define VERIFY_OK(statement) 0 +#define VERIFY_OK_AND_ASSIGN(var, expression) 0 +#define VERIFY_SUCCESS(expr) 0 diff --git a/test/extensions/quic_listeners/quiche/BUILD b/test/extensions/quic_listeners/quiche/BUILD new file mode 100644 index 0000000000000..3195a9bff53af --- /dev/null +++ b/test/extensions/quic_listeners/quiche/BUILD @@ -0,0 +1,23 @@ +licenses(["notice"]) # Apache 2 + +load( + "//bazel:envoy_build_system.bzl", + "envoy_cc_fuzz_test", + "envoy_cc_test", + "envoy_cc_test_binary", + "envoy_cc_test_library", + "envoy_package", + "envoy_proto_library", +) + +envoy_package() + +envoy_cc_test( + name = "dummy_test", + srcs = ["dummy_test.cc"], + external_deps = ["quiche_http2_platform"], + deps = [ + "//source/extensions/quic_listeners/quiche:dummy_lib", + "//test/test_common:utility_lib", + ], +) diff --git a/test/extensions/quic_listeners/quiche/dummy_test.cc b/test/extensions/quic_listeners/quiche/dummy_test.cc new file mode 100644 index 0000000000000..1d454c41e6a91 --- /dev/null +++ b/test/extensions/quic_listeners/quiche/dummy_test.cc @@ -0,0 +1,19 @@ +#include "extensions/quic_listeners/quiche/dummy.h" + +#include "gtest/gtest.h" +#include "quiche/http2/platform/api/http2_string.h" + +namespace Envoy { +namespace Extensions { +namespace QuicListeners { +namespace Quiche { + +TEST(DummyTest, Dummy) { + http2::Http2String foo = "bar"; + EXPECT_EQ("bar cowbell", moreCowbell(foo)); +} + +} // namespace Quiche +} // namespace QuicListeners +} // namespace Extensions +} // namespace Envoy