1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
load("//build:build.bzl", "go_custom_test")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "reverse_tunnel",
srcs = [
"api.go",
"doc.go",
"tunnel.go",
"tunnel_registry.go",
],
importpath = "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/module/reverse_tunnel",
visibility = ["//:__subpackages__"],
deps = [
"//internal/api",
"//internal/module/reverse_tunnel/info",
"//internal/module/reverse_tunnel/rpc",
"//internal/module/reverse_tunnel/tracker",
"//internal/tool/errz",
"//internal/tool/grpctool",
"//internal/tool/logz",
"//internal/tool/prototool",
"@org_golang_google_genproto_googleapis_rpc//status",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//codes",
"@org_golang_google_grpc//metadata",
"@org_golang_google_grpc//status",
"@org_golang_google_protobuf//reflect/protoreflect",
"@org_uber_go_zap//:zap",
],
)
go_custom_test(
name = "reverse_tunnel_test",
srcs = [
"mock_for_test.go",
"tunnel_registry_test.go",
"tunnel_test.go",
],
embed = [":reverse_tunnel"],
deps = [
"//internal/module/reverse_tunnel/info",
"//internal/module/reverse_tunnel/rpc",
"//internal/tool/grpctool",
"//internal/tool/prototool",
"//internal/tool/testing/matcher",
"//internal/tool/testing/mock_modserver",
"//internal/tool/testing/mock_reverse_tunnel_rpc",
"//internal/tool/testing/mock_reverse_tunnel_tracker",
"//internal/tool/testing/mock_rpc",
"//internal/tool/testing/mock_tool",
"//internal/tool/testing/testhelpers",
"@com_github_golang_mock//gomock",
"@com_github_stretchr_testify//assert",
"@com_github_stretchr_testify//require",
"@io_k8s_apimachinery//pkg/util/wait",
"@org_golang_google_genproto_googleapis_rpc//status",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//codes",
"@org_golang_google_grpc//metadata",
"@org_golang_google_grpc//status",
"@org_uber_go_zap//zaptest",
],
)
|