From ed1c7b88580aaffc499d0bae0c6f0281109eb0ce Mon Sep 17 00:00:00 2001 From: Patrick Jones Date: Thu, 29 Oct 2020 12:28:45 -0700 Subject: [PATCH] google: add ExchangeToken unit tests --- google/internal/externalaccount/sts_exchange_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/google/internal/externalaccount/sts_exchange_test.go b/google/internal/externalaccount/sts_exchange_test.go index 82ee59a..451b86a 100644 --- a/google/internal/externalaccount/sts_exchange_test.go +++ b/google/internal/externalaccount/sts_exchange_test.go @@ -78,3 +78,11 @@ func TestExchangeToken(t *testing.T) { } } + +func TestExchangeToken_Err(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json") + w.Write([]byte("what's wrong with this response?")) + })) + +} \ No newline at end of file