Merge pull request #1464 from smallstep/herman/fix-tpm-simulator-tests

Fix TPM simulator initialization for tests
This commit is contained in:
Herman Slatman 2023-07-10 18:51:15 +02:00 committed by GitHub
commit 10b7280e17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,8 +49,9 @@ func withSimulator(t *testing.T) tpm.NewTPMOption {
err := sim.Close()
require.NoError(t, err)
})
sim = simulator.New()
err := sim.Open()
sim, err := simulator.New()
require.NoError(t, err)
err = sim.Open()
require.NoError(t, err)
return tpm.WithSimulator(sim)
}