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 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
load("//build:build.bzl", "go_custom_test")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "server",
srcs = [
"defaulting.go",
"factory.go",
"module.go",
"project_info_client.go",
"server.go",
"visitor.go",
],
importpath = "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/module/gitops/server",
visibility = ["//:__subpackages__"],
deps = [
"//internal/api",
"//internal/gitaly",
"//internal/gitaly/vendored/gitalypb",
"//internal/gitlab",
"//internal/gitlab/api",
"//internal/module/gitops",
"//internal/module/gitops/rpc",
"//internal/module/modserver",
"//internal/module/modshared",
"//internal/module/usage_metrics",
"//internal/tool/cache",
"//internal/tool/errz",
"//internal/tool/grpctool",
"//internal/tool/logz",
"//internal/tool/prototool",
"//internal/tool/redistool",
"//internal/tool/retry",
"//pkg/kascfg",
"@com_github_redis_rueidis//:rueidis",
"@io_k8s_apimachinery//pkg/util/wait",
"@org_golang_google_grpc//codes",
"@org_golang_google_grpc//status",
"@org_uber_go_zap//:zap",
],
)
go_custom_test(
name = "server_test",
srcs = [
"module_test.go",
"server_test.go",
"visitor_test.go",
],
embed = [":server"],
deps = [
"//internal/api",
"//internal/gitaly",
"//internal/gitaly/vendored/gitalypb",
"//internal/gitlab/api",
"//internal/module/gitops/rpc",
"//internal/module/modserver",
"//internal/tool/testing/kube_testing",
"//internal/tool/testing/matcher",
"//internal/tool/testing/mock_gitlab",
"//internal/tool/testing/mock_internalgitaly",
"//internal/tool/testing/mock_modserver",
"//internal/tool/testing/mock_rpc",
"//internal/tool/testing/mock_usage_metrics",
"//internal/tool/testing/testhelpers",
"//pkg/kascfg",
"@com_github_golang_mock//gomock",
"@com_github_prometheus_client_golang//prometheus",
"@com_github_redis_rueidis//mock",
"@com_github_stretchr_testify//assert",
"@com_github_stretchr_testify//require",
"@io_k8s_api//core/v1:core",
"@io_k8s_apimachinery//pkg/apis/meta/v1:meta",
"@io_k8s_apimachinery//pkg/runtime",
"@io_opentelemetry_go_otel_trace//:trace",
"@org_golang_google_grpc//codes",
"@org_golang_google_grpc//status",
"@org_golang_google_protobuf//types/known/durationpb",
"@org_uber_go_zap//zaptest",
],
)
|