test: improve failure message

Co-Authored-By: schmichael <michael.schurter@gmail.com>
This commit is contained in:
Mahmood Ali 2019-02-14 08:11:37 -08:00 committed by GitHub
parent 4814f0fb0b
commit 16d3414842
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -835,7 +835,7 @@ func TestTaskRunner_BlockForVault(t *testing.T) {
// Check the token was revoked
testutil.WaitForResult(func() (bool, error) {
if len(vaultClient.StoppedTokens()) != 1 {
return false, fmt.Errorf("Expected a stopped token: %v", vaultClient.StoppedTokens())
return false, fmt.Errorf("Expected a stopped token %q but found: %v", token, vaultClient.StoppedTokens())
}
if a := vaultClient.StoppedTokens()[0]; a != token {