2017-08-03 17:24:27 +00:00
|
|
|
package inmem
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2018-04-03 00:46:59 +00:00
|
|
|
log "github.com/hashicorp/go-hclog"
|
2019-04-12 21:54:35 +00:00
|
|
|
"github.com/hashicorp/vault/sdk/helper/logging"
|
|
|
|
"github.com/hashicorp/vault/sdk/physical"
|
2017-08-03 17:24:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestInmemHA(t *testing.T) {
|
2018-04-03 00:46:59 +00:00
|
|
|
logger := logging.NewVaultLogger(log.Debug)
|
2017-08-03 17:24:27 +00:00
|
|
|
|
|
|
|
inm, err := NewInmemHA(nil, logger)
|
|
|
|
if err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
2018-11-01 17:31:09 +00:00
|
|
|
|
|
|
|
// Use the same inmem backend to acquire the same set of locks
|
2017-08-03 17:24:27 +00:00
|
|
|
physical.ExerciseHABackend(t, inm.(physical.HABackend), inm.(physical.HABackend))
|
|
|
|
}
|