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
|
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",
],
importpath = "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/module/usage_metrics/server",
visibility = ["//:__subpackages__"],
deps = [
"//internal/gitlab",
"//internal/gitlab/api",
"//internal/module/modserver",
"//internal/module/modshared",
"//internal/module/usage_metrics",
"//internal/tool/errz",
"//internal/tool/prototool",
"//pkg/kascfg",
"@org_uber_go_zap//:zap",
],
)
go_custom_test(
name = "server_test",
srcs = ["module_test.go"],
embed = [":server"],
deps = [
"//internal/gitlab/api",
"//internal/module/modserver",
"//internal/module/modshared",
"//internal/module/usage_metrics",
"//internal/tool/httpz",
"//internal/tool/testing/matcher",
"//internal/tool/testing/mock_gitlab",
"//internal/tool/testing/mock_modserver",
"//internal/tool/testing/mock_usage_metrics",
"//internal/tool/testing/testhelpers",
"//pkg/kascfg",
"@com_github_golang_mock//gomock",
"@com_github_stretchr_testify//assert",
"@com_github_stretchr_testify//require",
"@org_golang_google_protobuf//types/known/durationpb",
"@org_uber_go_zap//zaptest",
],
)
|