github.phpd.cn/thought-machine/please@v12.2.0+incompatible/tools/cache/server/BUILD (about) 1 go_library( 2 name = 'server', 3 srcs = [ 4 'cache.go', 5 'http_server.go', 6 'rpc_server.go', 7 ], 8 deps = [ 9 '//src/cache/proto:rpc_cache', 10 '//src/core', 11 '//src/fs', 12 '//third_party/go:atime', 13 '//third_party/go:concurrent-map', 14 '//third_party/go:grpc', 15 '//third_party/go:grpc-middleware', 16 '//third_party/go:grpc-prometheus', 17 '//third_party/go:humanize', 18 '//third_party/go:logging', 19 '//third_party/go:mux', 20 '//third_party/go:prometheus', 21 '//tools/cache/cluster', 22 ], 23 # Exposed for a test only. 24 visibility = [ 25 '//src/cache/...', 26 '//tools/cache:all', 27 ], 28 ) 29 30 go_test( 31 name = 'http_server_test', 32 srcs = ['http_server_test.go'], 33 data = [':test_data'], 34 deps = [ 35 ':server', 36 ], 37 ) 38 39 go_test( 40 name = 'rpc_server_test', 41 srcs = ['rpc_server_test.go'], 42 data = [ 43 ':test_data', 44 '//src/cache:test_data', 45 ], 46 flaky = True, 47 deps = [ 48 ':server', 49 '//third_party/go:testify', 50 ], 51 ) 52 53 go_test( 54 name = 'cache_test', 55 srcs = ['cache_test.go'], 56 data = [':test_data'], 57 deps = [ 58 ':server', 59 '//src/core', 60 '//third_party/go:testify', 61 ], 62 ) 63 64 go_test( 65 name = 'cache_stress_test', 66 srcs = ['cache_stress_test.go'], 67 deps = [ 68 ':server', 69 '//third_party/go:testify', 70 ], 71 ) 72 73 filegroup( 74 name = 'test_data', 75 srcs = glob(['test_data/**']), 76 test_only = True, 77 )