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
|
load("//build:build.bzl", "go_custom_test")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "modagent",
srcs = [
"api.go",
"doc.go",
"rpc_api.go",
"worker_manager.go",
],
importpath = "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/module/modagent",
visibility = [
"//cmd/agentk:__subpackages__",
"//internal/module/flux/agent:__subpackages__",
"//internal/module/gitops/agent:__subpackages__",
"//internal/module/kubernetes_api/agent:__subpackages__",
"//internal/module/observability/agent:__subpackages__",
"//internal/module/remote_development/agent:__subpackages__",
"//internal/module/reverse_tunnel/agent:__subpackages__",
"//internal/module/reverse_tunnel/test:__subpackages__",
"//internal/module/starboard_vulnerability/agent:__subpackages__",
"//internal/tool/testing/mock_modagent:__subpackages__",
],
deps = [
"//internal/module/modshared",
"//internal/tool/httpz",
"//internal/tool/logz",
"//pkg/agentcfg",
"@com_github_grpc_ecosystem_go_grpc_middleware_v2//:go-grpc-middleware",
"@io_k8s_apimachinery//pkg/util/wait",
"@io_k8s_kubectl//pkg/cmd/util",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_protobuf//proto",
"@org_uber_go_zap//:zap",
],
)
go_custom_test(
name = "modagent_test",
srcs = [
"api_test.go",
"mock_for_test.go",
"worker_manager_test.go",
],
embed = [":modagent"],
deps = [
"//internal/tool/testing/testhelpers",
"//pkg/agentcfg",
"@com_github_golang_mock//gomock",
"@com_github_stretchr_testify//assert",
"@com_github_stretchr_testify//require",
"@org_golang_google_protobuf//proto",
"@org_uber_go_zap//zaptest",
],
)
|