diff --git a/bazel/go_container.bzl b/bazel/go_container.bzl new file mode 100644 index 00000000000..550daa25cd2 --- /dev/null +++ b/bazel/go_container.bzl @@ -0,0 +1,324 @@ +# Copyright 2018- The Pixie Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +load("//bazel:pl_build_system.bzl", "pl_boringcrypto_go_sdk") + +""" +Bazel rules and macros for generating Go container test libraries. + +This module provides a custom rule and macros to generate C++ header files +for Go container test fixtures at build time. This eliminates the need for +manually maintaining per-version header files. + +There are two types of container sources: +- bazel_sdk_versions: Built from source using Bazel's Go SDK cross-compilation +- prebuilt_container_versions: Use pre-built container images from the containers directory + +Usage: + In BUILD.bazel: + load("//bazel:go_container.bzl", "go_container_libraries") + + go_container_libraries( + container_type = "grpc_server", + bazel_sdk_versions = ["1.23", "1.24"], + prebuilt_container_versions = ["1.18", "1.19"], + ) +""" + +load("//bazel:pl_build_system.bzl", "pl_cc_test_library") + +_LICENSE_HEADER = """\ +/* + * Copyright 2018- The Pixie Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +// AUTO-GENERATED FILE - DO NOT EDIT", +// Generated by //bazel:go_container.bzl", + +#pragma once + +""" + + +# Template for container header content +_CONTAINER_HEADER_TEMPLATE = _LICENSE_HEADER + """\ + +#include + +#include "src/common/testing/test_environment.h" +#include "src/common/testing/test_utils/container_runner.h" + +namespace px {{ +namespace stirling {{ +namespace testing {{ + +class {class_name} : public ContainerRunner {{ + public: + {class_name}() + : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, + kReadyMessage) {{}} + + private: + static constexpr std::string_view kBazelImageTar = + "{tar_path}"; + static constexpr std::string_view kContainerNamePrefix = "{container_prefix}"; + static constexpr std::string_view kReadyMessage = {ready_message}; +}}; + +}} // namespace testing +}} // namespace stirling +}} // namespace px +""" + +# Configuration for each use case +# Keys: container_type name +# Values: dict with container_prefix, ready_message, tar patterns +_GO_CONTAINER_CONFIGS = { + "grpc_server": { + "container_prefix": "grpc_server", + "ready_message": '"Starting HTTP/2 server"', + "tar_pattern_bazel_sdk": "src/stirling/testing/demo_apps/go_grpc_tls_pl/server/golang_{version}_grpc_tls_server.tar", + "tar_pattern_prebuilt": "src/stirling/source_connectors/socket_tracer/testing/containers/golang_{version}_grpc_server_with_buildinfo.tar", + "class_suffix": "GRPCServerContainer", + }, + "grpc_client": { + "container_prefix": "grpc_client", + "ready_message": '""', + "tar_pattern_bazel_sdk": "src/stirling/testing/demo_apps/go_grpc_tls_pl/client/golang_{version}_grpc_tls_client.tar", + "tar_pattern_prebuilt": None, + "class_suffix": "GRPCClientContainer", + }, + "tls_server": { + "container_prefix": "https_server", + "ready_message": '"Starting HTTPS service"', + "tar_pattern_bazel_sdk": "src/stirling/testing/demo_apps/go_https/server/golang_{version}_https_server.tar", + "tar_pattern_prebuilt": "src/stirling/source_connectors/socket_tracer/testing/containers/golang_{version}_https_server_with_buildinfo.tar", + "class_suffix": "TLSServerContainer", + }, + "tls_client": { + "container_prefix": "https_client", + "ready_message": 'R"({"status":"ok"})"', + "tar_pattern_bazel_sdk": "src/stirling/testing/demo_apps/go_https/client/golang_{version}_https_client.tar", + "tar_pattern_prebuilt": None, + "class_suffix": "TLSClientContainer", + }, +} + +def _version_to_class_prefix(version): + """Convert version string to class name prefix. + + Args: + version: Go SDK version string (e.g., "1.24", "1.23.11") + + Returns: + Class name prefix (e.g., "Go1_24_", "GoBoringCrypto") + """ + + if version in pl_boringcrypto_go_sdk: + return "GoBoringCrypto" + return "Go" + version.replace(".", "_") + "_" + +def _version_to_label_suffix(version): + """Convert version string to bazel label suffix. + + Args: + version: Go SDK version string (e.g., "1.24", "1.23.11") + + Returns: + Label suffix (e.g., "1_24", "boringcrypto") + """ + + if version in pl_boringcrypto_go_sdk: + return "boringcrypto" + return version.replace(".", "_") + +def _go_container_header_impl(ctx): + """Generate a Go container header file.""" + output = ctx.actions.declare_file(ctx.attr.header_name) + + ctx.actions.write( + output = output, + content = _CONTAINER_HEADER_TEMPLATE.format( + class_name = ctx.attr.class_name, + tar_path = ctx.attr.tar_path, + container_prefix = ctx.attr.container_prefix, + ready_message = ctx.attr.ready_message, + ), + ) + return [DefaultInfo(files = depset([output]))] + +go_container_header = rule( + implementation = _go_container_header_impl, + attrs = { + "class_name": attr.string(mandatory = True), + "container_prefix": attr.string(mandatory = True), + "header_name": attr.string(mandatory = True), + "ready_message": attr.string(mandatory = True), + "tar_path": attr.string(mandatory = True), + }, +) + +def go_container_library(name, container_type, version, use_prebuilt = False): + """ + Create a container library for a specific Go version and use case. + + This macro generates a C++ header file and wraps it in a pl_cc_test_library + that can be used as a dependency in tests. + + Args: + name: Target name for the library + container_type: One of "grpc_server", "grpc_client", "tls_server", "tls_client" + version: Go SDK version (e.g., "1.24", "1.23.11") + use_prebuilt: Whether to use prebuilt container tar path (for older Go versions that are no longer built via bazel) + """ + if container_type not in _GO_CONTAINER_CONFIGS: + fail("Invalid container type'{}'. Must be one of: {}".format( + container_type, + ", ".join(_GO_CONTAINER_CONFIGS.keys()), + )) + config = _GO_CONTAINER_CONFIGS[container_type] + label_suffix = _version_to_label_suffix(version) + class_prefix = _version_to_class_prefix(version) + + # Determine tar path pattern based on container source + if use_prebuilt: + tar_pattern = config["tar_pattern_prebuilt"] + if not tar_pattern: + fail("container_type '{}' does not support prebuilt containers".format(container_type)) + else: + tar_pattern = config["tar_pattern_bazel_sdk"] + + tar_path = tar_pattern.format(version = label_suffix) + + # Class name: Go{version}_{UseCase}Container or GoBoringCrypto{UseCase}Container + class_name = class_prefix + config["class_suffix"] + + header_name = "go_{}_{}_container.h".format(label_suffix, container_type) + + # Generate the header + go_container_header( + name = name + "_header", + header_name = header_name, + class_name = class_name, + tar_path = tar_path, + container_prefix = config["container_prefix"], + ready_message = config["ready_message"], + ) + + # Parse tar path to get the Bazel label + # e.g., "src/stirling/testing/demo_apps/go_grpc_tls_pl/server/golang_1_24_grpc_tls_server.tar" + # becomes "//src/stirling/testing/demo_apps/go_grpc_tls_pl/server:golang_1_24_grpc_tls_server.tar" + tar_dir = tar_path.rsplit("/", 1)[0] + tar_file = tar_path.rsplit("/", 1)[1] + tar_label = "//" + tar_dir + ":" + tar_file + + # Create the test library + pl_cc_test_library( + name = name, + hdrs = [":" + name + "_header"], + data = [tar_label], + deps = ["//src/common/testing/test_utils:cc_library"], + ) + +def _get_header_path(container_type, label_suffix): + """Get the generated header path for a container.""" + return "src/stirling/source_connectors/socket_tracer/testing/container_images/go_{}_{}_container.h".format( + label_suffix, + container_type, + ) + +def go_container_libraries(container_type, bazel_sdk_versions = [], prebuilt_container_versions = []): + """ + Generate container libraries for all versions of a use case. + + This is a convenience macro that generates multiple go_container_library + targets in a single call. The two version lists are mutually exclusive - + each version should appear in exactly one list. + + Args: + container_type: One of "grpc_server", "grpc_client", "tls_server", "tls_client" + bazel_sdk_versions: List of Go SDK versions built from source using Bazel + prebuilt_container_versions: List of Go versions using pre-built container images + """ + all_versions = prebuilt_container_versions + bazel_sdk_versions + include_paths = [] + deps = [] + + # Generate libraries for prebuilt container versions + for version in prebuilt_container_versions: + label_suffix = _version_to_label_suffix(version) + target_name = "go_{}_{}_container".format(label_suffix, container_type) + go_container_library( + name = target_name, + container_type = container_type, + version = version, + use_prebuilt = True, + ) + include_paths.append(_get_header_path(container_type, label_suffix)) + deps.append(":" + target_name) + + # Generate libraries for Bazel SDK versions (built from source) + for version in bazel_sdk_versions: + label_suffix = _version_to_label_suffix(version) + target_name = "go_{}_{}_container".format(label_suffix, container_type) + go_container_library( + name = target_name, + container_type = container_type, + version = version, + use_prebuilt = False, + ) + include_paths.append(_get_header_path(container_type, label_suffix)) + deps.append(":" + target_name) + + # Generate the aggregated includes header + if include_paths: + # Header name: go_{container_type}_containers.h + # e.g., "grpc_server" -> "go_grpc_server_containers.h" + header_name = "go_{}_containers.h".format(container_type) + includes_target_name = "go_{}_containers".format(container_type) + + # Build the header content + header_lines = _LICENSE_HEADER.splitlines() + for include_path in include_paths: + header_lines.append('#include "{}"'.format(include_path)) + header_content = "\\n".join(header_lines) + + # Use genrule to generate the header + native.genrule( + name = includes_target_name + "_gen", + outs = [header_name], + cmd = "printf '{}' > $@".format(header_content), + ) + + pl_cc_test_library( + name = includes_target_name, + hdrs = [":" + includes_target_name + "_gen"], + deps = deps, + ) diff --git a/bazel/pl_build_system.bzl b/bazel/pl_build_system.bzl index 82b6acb5e07..f8eaa66efdc 100644 --- a/bazel/pl_build_system.bzl +++ b/bazel/pl_build_system.bzl @@ -28,6 +28,7 @@ pl_go_test_versions = ["1.18", "1.19", "1.20", "1.21", "1.22"] pl_supported_go_sdk_versions = ["1.23", "1.24"] # The last version in this list corresponds to the boringcrypto go sdk version. +# This list is used for generating container libraries and other version-specific targets. pl_all_supported_go_sdk_versions = pl_supported_go_sdk_versions + pl_boringcrypto_go_sdk def pl_go_sdk_version_template_to_label(tpl, version): diff --git a/src/stirling/source_connectors/socket_tracer/BUILD.bazel b/src/stirling/source_connectors/socket_tracer/BUILD.bazel index 8eae06c9bc2..76a9ca13b77 100644 --- a/src/stirling/source_connectors/socket_tracer/BUILD.bazel +++ b/src/stirling/source_connectors/socket_tracer/BUILD.bazel @@ -344,17 +344,8 @@ pl_cc_bpf_test( "//src/common/exec:cc_library", "//src/common/testing/test_utils:cc_library", "//src/stirling/source_connectors/socket_tracer/testing:cc_library", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_18_grpc_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_19_grpc_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_20_grpc_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_21_grpc_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_22_grpc_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_23_grpc_client_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_23_grpc_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_24_grpc_client_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_24_grpc_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_boringcrypto_grpc_client_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_boringcrypto_grpc_server_container", + "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_grpc_client_containers", + "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_grpc_server_containers", "//src/stirling/source_connectors/socket_tracer/testing/container_images:product_catalog_client_container", "//src/stirling/source_connectors/socket_tracer/testing/container_images:product_catalog_service_container", "//src/stirling/testing:cc_library", @@ -563,17 +554,8 @@ pl_cc_bpf_test( "//src/common/exec:cc_library", "//src/common/testing/test_utils:cc_library", "//src/stirling/source_connectors/socket_tracer/testing:cc_library", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_18_tls_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_19_tls_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_20_tls_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_21_tls_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_22_tls_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_23_tls_client_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_23_tls_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_24_tls_client_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_1_24_tls_server_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_boringcrypto_tls_client_container", - "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_boringcrypto_tls_server_container", + "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_tls_client_containers", + "//src/stirling/source_connectors/socket_tracer/testing/container_images:go_tls_server_containers", "//src/stirling/testing:cc_library", ], ) diff --git a/src/stirling/source_connectors/socket_tracer/go_tls_trace_bpf_test.cc b/src/stirling/source_connectors/socket_tracer/go_tls_trace_bpf_test.cc index 9e3120763df..afe76d9f758 100644 --- a/src/stirling/source_connectors/socket_tracer/go_tls_trace_bpf_test.cc +++ b/src/stirling/source_connectors/socket_tracer/go_tls_trace_bpf_test.cc @@ -20,17 +20,8 @@ #include #include "src/common/testing/testing.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_18_tls_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_19_tls_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_20_tls_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_tls_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_22_tls_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_tls_client_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_tls_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_tls_client_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_tls_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_tls_client_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_tls_server_container.h" +#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_tls_client_containers.h" +#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_tls_server_containers.h" #include "src/stirling/source_connectors/socket_tracer/testing/protocol_checkers.h" #include "src/stirling/source_connectors/socket_tracer/testing/socket_trace_bpf_test_fixture.h" #include "src/stirling/testing/common.h" diff --git a/src/stirling/source_connectors/socket_tracer/http2_trace_bpf_test.cc b/src/stirling/source_connectors/socket_tracer/http2_trace_bpf_test.cc index d98f4375118..61cdc2625c0 100644 --- a/src/stirling/source_connectors/socket_tracer/http2_trace_bpf_test.cc +++ b/src/stirling/source_connectors/socket_tracer/http2_trace_bpf_test.cc @@ -21,17 +21,8 @@ #include "src/common/exec/subprocess.h" #include "src/stirling/core/output.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_18_grpc_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_19_grpc_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_20_grpc_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_grpc_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_22_grpc_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_grpc_client_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_grpc_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_grpc_client_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_grpc_server_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_grpc_client_container.h" -#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_grpc_server_container.h" +#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_grpc_client_containers.h" +#include "src/stirling/source_connectors/socket_tracer/testing/container_images/go_grpc_server_containers.h" #include "src/stirling/source_connectors/socket_tracer/testing/container_images/product_catalog_client_container.h" #include "src/stirling/source_connectors/socket_tracer/testing/container_images/product_catalog_service_container.h" #include "src/stirling/source_connectors/socket_tracer/testing/protocol_checkers.h" diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/BUILD.bazel b/src/stirling/source_connectors/socket_tracer/testing/container_images/BUILD.bazel index aca663b0db9..0d1ad990576 100644 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/BUILD.bazel +++ b/src/stirling/source_connectors/socket_tracer/testing/container_images/BUILD.bazel @@ -14,12 +14,38 @@ # # SPDX-License-Identifier: Apache-2.0 -load("//bazel:pl_build_system.bzl", "pl_boringcrypto_go_sdk", "pl_cc_test_library", "pl_go_sdk_version_template_to_label", "pl_go_test_versions", "pl_supported_go_sdk_versions") - -pl_all_supported_go_sdk_versions = pl_supported_go_sdk_versions + pl_boringcrypto_go_sdk +load("//bazel:go_container.bzl", "go_container_libraries") +load("//bazel:pl_build_system.bzl", "pl_all_supported_go_sdk_versions", "pl_cc_test_library", "pl_go_test_versions") package(default_visibility = ["//src/stirling:__subpackages__"]) +# Generate all Go container library permutations for supported Go versions. +go_container_libraries( + container_type = "grpc_server", + bazel_sdk_versions = pl_all_supported_go_sdk_versions, + prebuilt_container_versions = pl_go_test_versions, +) + +# Stirling test cases usually test server side tracing. Therefore +# we only need to provide the bazel SDK versions for the client containers. +go_container_libraries( + container_type = "grpc_client", + bazel_sdk_versions = pl_all_supported_go_sdk_versions, +) + +go_container_libraries( + container_type = "tls_server", + bazel_sdk_versions = pl_all_supported_go_sdk_versions, + prebuilt_container_versions = pl_go_test_versions, +) + +# Stirling test cases usually test server side tracing. Therefore +# we only need to provide the bazel SDK versions for the client containers. +go_container_libraries( + container_type = "tls_client", + bazel_sdk_versions = pl_all_supported_go_sdk_versions, +) + pl_cc_test_library( name = "bssl_container", srcs = [], @@ -60,84 +86,6 @@ pl_cc_test_library( deps = ["//src/common/testing/test_utils:cc_library"], ) -[ - pl_cc_test_library( - name = pl_go_sdk_version_template_to_label("go_%s_grpc_client_container", sdk_version), - srcs = [], - hdrs = [pl_go_sdk_version_template_to_label("go_%s_grpc_client_container.h", sdk_version)], - data = [ - pl_go_sdk_version_template_to_label("//src/stirling/testing/demo_apps/go_grpc_tls_pl/client:golang_%s_grpc_tls_client.tar", sdk_version), - ], - deps = ["//src/common/testing/test_utils:cc_library"], - ) - for sdk_version in pl_all_supported_go_sdk_versions -] - -[ - pl_cc_test_library( - name = pl_go_sdk_version_template_to_label("go_%s_grpc_server_container", sdk_version), - srcs = [], - hdrs = [pl_go_sdk_version_template_to_label("go_%s_grpc_server_container.h", sdk_version)], - data = [ - pl_go_sdk_version_template_to_label("//src/stirling/testing/demo_apps/go_grpc_tls_pl/server:golang_%s_grpc_tls_server.tar", sdk_version), - ], - deps = ["//src/common/testing/test_utils:cc_library"], - ) - for sdk_version in pl_all_supported_go_sdk_versions -] - -[ - pl_cc_test_library( - name = pl_go_sdk_version_template_to_label("go_%s_grpc_server_container", sdk_version), - srcs = [], - hdrs = [pl_go_sdk_version_template_to_label("go_%s_grpc_server_container.h", sdk_version)], - data = [ - pl_go_sdk_version_template_to_label("//src/stirling/source_connectors/socket_tracer/testing/containers:golang_%s_grpc_server_with_buildinfo.tar", sdk_version), - ], - deps = ["//src/common/testing/test_utils:cc_library"], - ) - for sdk_version in pl_go_test_versions -] - -[ - pl_cc_test_library( - name = pl_go_sdk_version_template_to_label("go_%s_tls_client_container", sdk_version), - srcs = [], - hdrs = [pl_go_sdk_version_template_to_label("go_%s_tls_client_container.h", sdk_version)], - data = [ - pl_go_sdk_version_template_to_label("//src/stirling/testing/demo_apps/go_https/client:golang_%s_https_client.tar", sdk_version), - ], - deps = ["//src/common/testing/test_utils:cc_library"], - ) - for sdk_version in pl_all_supported_go_sdk_versions -] - -[ - pl_cc_test_library( - name = pl_go_sdk_version_template_to_label("go_%s_tls_server_container", sdk_version), - srcs = [], - hdrs = [pl_go_sdk_version_template_to_label("go_%s_tls_server_container.h", sdk_version)], - data = [ - pl_go_sdk_version_template_to_label("//src/stirling/testing/demo_apps/go_https/server:golang_%s_https_server.tar", sdk_version), - ], - deps = ["//src/common/testing/test_utils:cc_library"], - ) - for sdk_version in pl_all_supported_go_sdk_versions -] - -[ - pl_cc_test_library( - name = pl_go_sdk_version_template_to_label("go_%s_tls_server_container", sdk_version), - srcs = [], - hdrs = [pl_go_sdk_version_template_to_label("go_%s_tls_server_container.h", sdk_version)], - data = [ - pl_go_sdk_version_template_to_label("//src/stirling/source_connectors/socket_tracer/testing/containers:golang_%s_https_server_with_buildinfo.tar", sdk_version), - ], - deps = ["//src/common/testing/test_utils:cc_library"], - ) - for sdk_version in pl_go_test_versions -] - pl_cc_test_library( name = "golang_sqlx_container", srcs = [], diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_18_grpc_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_18_grpc_server_container.h deleted file mode 100644 index 12877b6908c..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_18_grpc_server_container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_18_GRPCServerContainer : public ContainerRunner { - public: - Go1_18_GRPCServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/source_connectors/socket_tracer/testing/containers/" - "golang_1_18_grpc_server_with_buildinfo.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "grpc_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTP/2 server"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_18_tls_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_18_tls_server_container.h deleted file mode 100644 index 1d0184072ac..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_18_tls_server_container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_18_TLSServerContainer : public ContainerRunner { - public: - Go1_18_TLSServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/source_connectors/socket_tracer/testing/containers/" - "golang_1_18_https_server_with_buildinfo.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "https_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTPS service"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_19_grpc_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_19_grpc_server_container.h deleted file mode 100644 index f655fe5fb0e..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_19_grpc_server_container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_19_GRPCServerContainer : public ContainerRunner { - public: - Go1_19_GRPCServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/source_connectors/socket_tracer/testing/containers/" - "golang_1_19_grpc_server_with_buildinfo.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "grpc_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTP/2 server"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_19_tls_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_19_tls_server_container.h deleted file mode 100644 index d4e845bd12c..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_19_tls_server_container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_19_TLSServerContainer : public ContainerRunner { - public: - Go1_19_TLSServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/source_connectors/socket_tracer/testing/containers/" - "golang_1_19_https_server_with_buildinfo.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "https_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTPS service"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_20_grpc_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_20_grpc_server_container.h deleted file mode 100644 index e64c6d93e7d..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_20_grpc_server_container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_20_GRPCServerContainer : public ContainerRunner { - public: - Go1_20_GRPCServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/source_connectors/socket_tracer/testing/containers/" - "golang_1_20_grpc_server_with_buildinfo.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "grpc_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTP/2 server"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_20_tls_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_20_tls_server_container.h deleted file mode 100644 index 13aabed1ade..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_20_tls_server_container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_20_TLSServerContainer : public ContainerRunner { - public: - Go1_20_TLSServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/source_connectors/socket_tracer/testing/containers/" - "golang_1_20_https_server_with_buildinfo.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "https_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTPS service"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_grpc_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_grpc_server_container.h deleted file mode 100644 index db0dbb25bce..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_grpc_server_container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_21_GRPCServerContainer : public ContainerRunner { - public: - Go1_21_GRPCServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/source_connectors/socket_tracer/testing/containers/" - "golang_1_21_grpc_server_with_buildinfo.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "grpc_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTP/2 server"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_tls_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_tls_server_container.h deleted file mode 100644 index 342d980b397..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_21_tls_server_container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_21_TLSServerContainer : public ContainerRunner { - public: - Go1_21_TLSServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/source_connectors/socket_tracer/testing/containers/" - "golang_1_21_https_server_with_buildinfo.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "https_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTPS service"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_22_grpc_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_22_grpc_server_container.h deleted file mode 100644 index 6218f483eb4..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_22_grpc_server_container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_22_GRPCServerContainer : public ContainerRunner { - public: - Go1_22_GRPCServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/source_connectors/socket_tracer/testing/" - "containers/golang_1_22_grpc_server_with_buildinfo.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "grpc_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTP/2 server"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_22_tls_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_22_tls_server_container.h deleted file mode 100644 index b07bf09348f..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_22_tls_server_container.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_22_TLSServerContainer : public ContainerRunner { - public: - Go1_22_TLSServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/source_connectors/socket_tracer/testing/containers/" - "golang_1_22_https_server_with_buildinfo.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "https_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTPS service"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_grpc_client_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_grpc_client_container.h deleted file mode 100644 index c89a0d91cb3..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_grpc_client_container.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_23_GRPCClientContainer : public ContainerRunner { - public: - Go1_23_GRPCClientContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - private: - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_grpc_tls_pl/client/golang_1_23_grpc_tls_client.tar"; - static constexpr std::string_view kContainerNamePrefix = "grpc_client"; - static constexpr std::string_view kReadyMessage = ""; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_grpc_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_grpc_server_container.h deleted file mode 100644 index 44dde6e32fd..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_grpc_server_container.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_23_GRPCServerContainer : public ContainerRunner { - public: - Go1_23_GRPCServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - private: - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_grpc_tls_pl/server/golang_1_23_grpc_tls_server.tar"; - static constexpr std::string_view kContainerNamePrefix = "grpc_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTP/2 server"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_tls_client_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_tls_client_container.h deleted file mode 100644 index ea85579aa27..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_tls_client_container.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_23_TLSClientContainer : public ContainerRunner { - public: - Go1_23_TLSClientContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - private: - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_https/client/golang_1_23_https_client.tar"; - static constexpr std::string_view kContainerNamePrefix = "https_client"; - static constexpr std::string_view kReadyMessage = R"({"status":"ok"})"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_tls_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_tls_server_container.h deleted file mode 100644 index 367cf8928a8..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_23_tls_server_container.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_23_TLSServerContainer : public ContainerRunner { - public: - Go1_23_TLSServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - private: - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_https/server/golang_1_23_https_server.tar"; - static constexpr std::string_view kContainerNamePrefix = "https_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTPS service"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_grpc_client_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_grpc_client_container.h deleted file mode 100644 index 8e2968de148..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_grpc_client_container.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_24_GRPCClientContainer : public ContainerRunner { - public: - Go1_24_GRPCClientContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - private: - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_grpc_tls_pl/client/golang_1_24_grpc_tls_client.tar"; - static constexpr std::string_view kContainerNamePrefix = "grpc_client"; - static constexpr std::string_view kReadyMessage = ""; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_grpc_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_grpc_server_container.h deleted file mode 100644 index f8c4f29445f..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_grpc_server_container.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_24_GRPCServerContainer : public ContainerRunner { - public: - Go1_24_GRPCServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_grpc_tls_pl/server/golang_1_24_grpc_tls_server.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "grpc_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTP/2 server"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_tls_client_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_tls_client_container.h deleted file mode 100644 index df5f38b11d7..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_tls_client_container.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_24_TLSClientContainer : public ContainerRunner { - public: - Go1_24_TLSClientContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - private: - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_https/client/golang_1_24_https_client.tar"; - static constexpr std::string_view kContainerNamePrefix = "https_client"; - static constexpr std::string_view kReadyMessage = R"({"status":"ok"})"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_tls_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_tls_server_container.h deleted file mode 100644 index a504ab2b47f..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_1_24_tls_server_container.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class Go1_24_TLSServerContainer : public ContainerRunner { - public: - Go1_24_TLSServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_https/server/golang_1_24_https_server.tar"; - - private: - static constexpr std::string_view kContainerNamePrefix = "https_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTPS service"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_grpc_client_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_grpc_client_container.h deleted file mode 100644 index 1fb92a6fa8b..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_grpc_client_container.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class GoBoringCryptoGRPCClientContainer : public ContainerRunner { - public: - GoBoringCryptoGRPCClientContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - private: - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_grpc_tls_pl/client/" - "golang_boringcrypto_grpc_tls_client.tar"; - static constexpr std::string_view kContainerNamePrefix = "grpc_client"; - static constexpr std::string_view kReadyMessage = ""; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_grpc_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_grpc_server_container.h deleted file mode 100644 index b0306581592..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_grpc_server_container.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class GoBoringCryptoGRPCServerContainer : public ContainerRunner { - public: - GoBoringCryptoGRPCServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - private: - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_grpc_tls_pl/server/" - "golang_boringcrypto_grpc_tls_server.tar"; - static constexpr std::string_view kContainerNamePrefix = "grpc_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTP/2 server"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_tls_client_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_tls_client_container.h deleted file mode 100644 index 6bdb6150314..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_tls_client_container.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class GoBoringCryptoTLSClientContainer : public ContainerRunner { - public: - GoBoringCryptoTLSClientContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - private: - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_https/client/golang_boringcrypto_https_client.tar"; - static constexpr std::string_view kContainerNamePrefix = "https_client"; - static constexpr std::string_view kReadyMessage = R"({"status":"ok"})"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px diff --git a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_tls_server_container.h b/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_tls_server_container.h deleted file mode 100644 index d8107e108ce..00000000000 --- a/src/stirling/source_connectors/socket_tracer/testing/container_images/go_boringcrypto_tls_server_container.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2018- The Pixie Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include - -#include "src/common/testing/test_environment.h" -#include "src/common/testing/test_utils/container_runner.h" - -namespace px { -namespace stirling { -namespace testing { - -class GoBoringCryptoTLSServerContainer : public ContainerRunner { - public: - GoBoringCryptoTLSServerContainer() - : ContainerRunner(::px::testing::BazelRunfilePath(kBazelImageTar), kContainerNamePrefix, - kReadyMessage) {} - - private: - static constexpr std::string_view kBazelImageTar = - "src/stirling/testing/demo_apps/go_https/server/golang_boringcrypto_https_server.tar"; - static constexpr std::string_view kContainerNamePrefix = "https_server"; - static constexpr std::string_view kReadyMessage = "Starting HTTPS service"; -}; - -} // namespace testing -} // namespace stirling -} // namespace px