-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Many tests in open_savess_test.go has seven lines for setup if they need a store and a record to work with.
ctx := context.Background()
_, listener := getOpenSavesServer(ctx, t, "gcp")
_, client := getTestClient(ctx, t, listener)
store := &pb.Store{Key: uuid.NewString()}
setupTestStore(ctx, t, client, store)
record := &pb.Record{Key: uuid.NewString()}
record = setupTestRecord(ctx, t, client, store.Key, record)This can and should be shorter, for example,
- create context
- create client
- create a default store and record
Also, tests use uuid as store and record keys to avoid conflicts, but something more predictable would be better for debugging. For example, "test name YYYY-MM-DD HH:mm:ss UUID" would let you know which entity corresponds to which test.
Metadata
Metadata
Assignees
Labels
No labels