-
Notifications
You must be signed in to change notification settings - Fork 127
Expand file tree
/
Copy pathBUILD
More file actions
122 lines (117 loc) · 4.29 KB
/
BUILD
File metadata and controls
122 lines (117 loc) · 4.29 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
package(default_visibility = ["//enterprise:__subpackages__"])
go_library(
name = "api",
srcs = ["api_server.go"],
importpath = "github.com/buildbuddy-io/buildbuddy/enterprise/server/api",
deps = [
"//enterprise/server/auditlog",
"//enterprise/server/backends/prom",
"//enterprise/server/hostedrunner",
"//proto:build_event_stream_go_proto",
"//proto:capability_go_proto",
"//proto:eventlog_go_proto",
"//proto:git_go_proto",
"//proto:invocation_go_proto",
"//proto:remote_execution_go_proto",
"//proto:resource_go_proto",
"//proto:runner_go_proto",
"//proto:workflow_go_proto",
"//proto/api/v1:api_v1_go_proto",
"//server/api/common",
"//server/build_event_protocol/build_event_handler",
"//server/environment",
"//server/eventlog",
"//server/http/protolet",
"//server/interfaces",
"//server/real_environment",
"//server/remote_cache/digest",
"//server/tables",
"//server/util/capabilities",
"//server/util/claims",
"//server/util/clickhouse/schema",
"//server/util/db",
"//server/util/flag",
"//server/util/log",
"//server/util/perms",
"//server/util/prefix",
"//server/util/proto",
"//server/util/query_builder",
"//server/util/request_context",
"//server/util/status",
"@com_github_prometheus_client_golang//prometheus/promhttp",
"@org_golang_google_protobuf//types/known/timestamppb",
],
)
# Tell gazelle to make each file a separate test target,
# so the ClickHouse-backed audit-log test can keep separate runner properties.
# gazelle:go_test file
go_test(
name = "api_test",
size = "small",
srcs = ["api_test.go"],
data = glob(["testdata/**"]),
embed = [":api"],
deps = [
"//enterprise/server/experiments",
"//enterprise/server/testutil/enterprise_testauth",
"//enterprise/server/testutil/enterprise_testenv",
"//proto:build_event_stream_go_proto",
"//proto:build_events_go_proto",
"//proto:capability_go_proto",
"//proto:failure_details_go_proto",
"//proto:group_go_proto",
"//proto:publish_build_event_go_proto",
"//proto:resource_go_proto",
"//proto:user_id_go_proto",
"//proto/api/v1:api_v1_go_proto",
"//proto/api/v1:common_go_proto",
"//server/build_event_protocol/build_event_handler",
"//server/interfaces",
"//server/tables",
"//server/testutil/testauth",
"//server/testutil/testdigest",
"//server/testutil/testenv",
"//server/testutil/testfs",
"//server/util/authutil",
"//server/util/claims",
"//server/util/prefix",
"//server/util/status",
"//server/util/testing/flags",
"@com_github_google_uuid//:uuid",
"@com_github_open_feature_go_sdk//openfeature",
"@com_github_open_feature_go_sdk_contrib_providers_flagd//pkg",
"@com_github_prometheus_client_model//io/prometheus/client:go",
"@com_github_stretchr_testify//assert",
"@com_github_stretchr_testify//require",
"@org_golang_google_protobuf//encoding/protojson",
"@org_golang_google_protobuf//types/known/anypb",
"@org_golang_google_protobuf//types/known/durationpb",
],
)
go_test(
name = "auditlog_test",
size = "small",
srcs = ["auditlog_test.go"],
data = glob(["testdata/**"]),
embed = [":api"],
exec_properties = {
"test.workload-isolation-type": "firecracker",
"test.init-dockerd": "true",
"test.recycle-runner": "true",
"test.runner-recycling-key": "clickhouse25.3",
},
tags = ["docker"],
deps = [
"//enterprise/server/auditlog",
"//enterprise/server/testutil/enterprise_testauth",
"//enterprise/server/testutil/enterprise_testenv",
"//proto:auditlog_go_proto",
"//proto:capability_go_proto",
"//proto:group_go_proto",
"//proto/api/v1:api_v1_go_proto",
"//server/util/testing/flags",
"@com_github_stretchr_testify//require",
"@org_golang_google_protobuf//types/known/timestamppb",
],
)