1
0
mirror of https://github.com/golang/go synced 2024-11-19 03:44:40 -07:00
go/internal/lsp/telemetry/ocagent
Emmanuel T Odeke e1fc249b66 internal/lsp/telemetry/ocagent: add convertAnnotation tests
* Adds tests for 'convertAnnotation'.
* Ensures that converting an empty string "" to
a truncatable string returns nil, to save bandwidth. However,
in the future, we should perhaps allow empty strings to
be serialized if say "emptyAllowed" is set.
* Caught the case where convertAttribute hadn't type
switched on "int"
* Provides 40.5% test coverage for ocagent.go

More tests for the other functions shall follow in later CLs.

Updates CL 186679

Change-Id: Ie9b46b0b320339ed79cd136fff536ccfcfbeb9e7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/188877
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-08-05 19:50:47 +00:00
..
wire internal/lsp: the json wire format of the open cencus agent 2019-07-18 23:01:37 +00:00
ocagent_test.go internal/lsp/telemetry/ocagent: add convertAnnotation tests 2019-08-05 19:50:47 +00:00
ocagent.go internal/lsp/telemetry/ocagent: add convertAnnotation tests 2019-08-05 19:50:47 +00:00