go_test doesn't copy deps from go_library
Created by: linzhp
The go_test doc says the library
param
will copy the srcs, package_name and deps from the target specified so you don't have to duplicate them.
However, it seems that deps are not copied. All deps of the go_libary a go_test is targeting have to be duplicated in the deps of the go_test.
I created a small example here to illustrate the bug. From the project root, if you run buck test //goTestDeps:all_tests
, the test will build and run successfully. However, buck test will fail if you remove this line from the BUCK file, which simply duplicates the deps in //goTestDeps:lib
, although //goTestDeps:all_tests
has no direct dependency on gopkg.in/yaml.v2
.