Fix TPM simulator initialization for tests

This commit is contained in:
Herman Slatman 2023-07-10 13:07:58 +02:00
parent 9a60734504
commit a5801b3c74
No known key found for this signature in database
GPG key ID: F4D8A44EA0A75A4F

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)
}