From 4b26227251adf4dfcc12e5adfd727fa178ccaabe Mon Sep 17 00:00:00 2001 From: Jared Harper Date: Wed, 31 Jul 2024 14:31:24 -0700 Subject: [PATCH] Add some test error debug --- internal/host/azure/azure_test.go | 2 +- internal/uams/http_test.go | 2 +- internal/uams/uams_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/host/azure/azure_test.go b/internal/host/azure/azure_test.go index aff0a7d4..0486830a 100644 --- a/internal/host/azure/azure_test.go +++ b/internal/host/azure/azure_test.go @@ -44,7 +44,7 @@ func TestQueryAzureNoHttpResponse(t *testing.T) { m, err := queryAzureIMDS("http://127.0.0.1:12345/asdf") require.Error(t, err) require.Nil(t, m) - require.True(t, errors.Is(err, syscall.ECONNREFUSED)) + require.True(t, errors.Is(err, syscall.ECONNREFUSED), "%+v", err) require.Nil(t, m.ToPB()) } diff --git a/internal/uams/http_test.go b/internal/uams/http_test.go index 20a16ccd..bb49dab0 100644 --- a/internal/uams/http_test.go +++ b/internal/uams/http_test.go @@ -29,7 +29,7 @@ func TestReadFromHttpConnRefused(t *testing.T) { uid, err := ReadFromHttp("http://127.0.0.1:12345") require.Error(t, err) require.Equal(t, uuid.Nil, uid) - require.True(t, errors.Is(err, syscall.ECONNREFUSED)) + require.True(t, errors.Is(err, syscall.ECONNREFUSED), "%+v", err) } func TestReadFromHttp(t *testing.T) { diff --git a/internal/uams/uams_test.go b/internal/uams/uams_test.go index 353d6e56..890a4bb7 100644 --- a/internal/uams/uams_test.go +++ b/internal/uams/uams_test.go @@ -43,7 +43,7 @@ func TestUpdateClientId(t *testing.T) { require.Equal(t, uid, currState.clientId) require.Equal(t, "file", currState.via) require.True(t, currState.updated.After(a)) - require.True(t, currState.updated.Before(b)) + require.True(t, currState.updated.Before(b), "currState.updated: %s, is not before %s", currState.updated.String(), b.String()) require.Equal(t, uid, GetCurrentClientId()) }