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
|
load("//build:build.bzl", "go_custom_test")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("//build:proto.bzl", "go_proto_generate")
go_proto_generate(
src = "gitlab.proto",
)
go_library(
name = "gitlab",
srcs = [
"client.go",
"client_options.go",
"do_options.go",
"error.go",
"gitlab.pb.go",
"response_handlers.go",
"types.go",
],
importpath = "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/gitlab",
visibility = ["//:__subpackages__"],
deps = [
"//internal/api",
"//internal/tool/errz",
"//internal/tool/httpz",
"//internal/tool/tlstool",
"@com_github_golang_jwt_jwt_v5//:jwt",
"@com_github_hashicorp_go_retryablehttp//:go-retryablehttp",
"@io_opentelemetry_go_contrib_instrumentation_net_http_otelhttp//:otelhttp",
"@io_opentelemetry_go_otel//:otel",
"@io_opentelemetry_go_otel//propagation",
"@org_golang_google_protobuf//encoding/protojson",
"@org_golang_google_protobuf//proto",
"@org_golang_google_protobuf//reflect/protoreflect",
"@org_golang_google_protobuf//runtime/protoimpl",
],
)
go_custom_test(
name = "gitlab_test",
srcs = ["client_test.go"],
deps = [
":gitlab",
"//internal/tool/httpz",
"//internal/tool/testing/mock_gitlab",
"//internal/tool/testing/testhelpers",
"@com_github_stretchr_testify//assert",
"@com_github_stretchr_testify//require",
],
)
|