Skip to content

Commit

Permalink
Add some test error debug
Browse files Browse the repository at this point in the history
  • Loading branch information
swi-jared committed Jul 31, 2024
1 parent 0321a01 commit 4b26227
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/host/azure/azure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}

Expand Down
2 changes: 1 addition & 1 deletion internal/uams/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/uams/uams_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
Expand Down

0 comments on commit 4b26227

Please sign in to comment.