Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSisley committed Oct 22, 2024
1 parent b268c0b commit e156ffd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/integration/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ type state struct {
// nodes.
docIDs [][]client.DocID

// CIDs by index, by field name, by doc index, by collection index.
cids [][]map[string][]cid.Cid

// Indexes, by index, by collection index, by node index.
indexes [][][]client.IndexDescription

Expand Down
13 changes: 13 additions & 0 deletions tests/integration/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"time"

"github.com/fxamacker/cbor/v2"
"github.com/ipfs/go-datastore/query"
"github.com/sourcenetwork/corelog"
"github.com/sourcenetwork/immutable"
"github.com/stretchr/testify/assert"
Expand All @@ -34,6 +35,7 @@ import (
"github.com/sourcenetwork/defradb/crypto"
"github.com/sourcenetwork/defradb/datastore"
"github.com/sourcenetwork/defradb/errors"
"github.com/sourcenetwork/defradb/internal/core"
"github.com/sourcenetwork/defradb/internal/db"
"github.com/sourcenetwork/defradb/internal/encryption"
"github.com/sourcenetwork/defradb/internal/request/graphql"
Expand Down Expand Up @@ -1273,6 +1275,17 @@ func createDoc(
}
s.docIDs[action.CollectionID] = append(s.docIDs[action.CollectionID], docIDs...)

for _, docID := range docIDs {
results, err := nodes[0].Headstore().Query(

Check failure on line 1279 in tests/integration/utils.go

View workflow job for this annotation

GitHub Actions / Lint GoLang job

results declared and not used

Check failure on line 1279 in tests/integration/utils.go

View workflow job for this annotation

GitHub Actions / Lint GoLang job

err declared and not used) (typecheck)

Check failure on line 1279 in tests/integration/utils.go

View workflow job for this annotation

GitHub Actions / Lint GoLang job

results declared and not used

Check failure on line 1279 in tests/integration/utils.go

View workflow job for this annotation

GitHub Actions / Lint GoLang job

err declared and not used (typecheck)

Check failure on line 1279 in tests/integration/utils.go

View workflow job for this annotation

GitHub Actions / Lint GoLang job

results declared and not used

Check failure on line 1279 in tests/integration/utils.go

View workflow job for this annotation

GitHub Actions / Lint GoLang job

err declared and not used) (typecheck)

Check failure on line 1279 in tests/integration/utils.go

View workflow job for this annotation

GitHub Actions / Lint GoLang job

results declared and not used
s.ctx,
query.Query{
Prefix: core.HeadStoreKey{
DocID: docID.String(),
}.ToString(),
},
)
}

if action.ExpectedError == "" {
waitForUpdateEvents(s, action.NodeID, getEventsForCreateDoc(s, action))
}
Expand Down

0 comments on commit e156ffd

Please sign in to comment.