Skip to content

Commit

Permalink
ƒix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nirav24 committed Jan 19, 2023
1 parent 1aac440 commit 1fda8d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions db/database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2813,16 +2813,16 @@ func Test_resyncDocument(t *testing.T) {
_, err = db.UpdateSyncFun(ctx, syncFn)
require.NoError(t, err)

_, _, err = collection.resyncDocument(ctx, docID, realDocID(docID), false, []uint64{10}, false)
_, _, err = collection.resyncDocument(ctx, docID, realDocID(docID), false, []uint64{10}, true)
require.NoError(t, err)
err = collection.WaitForPendingChanges(ctx)
require.NoError(t, err)

syncData, err := collection.GetDocSyncData(ctx, docID)
assert.NoError(t, err)

assert.Len(t, syncData.ChannelSet, 2)
assert.Len(t, syncData.Channels, 2)
assert.Len(t, syncData.ChannelSet, 3)
assert.Len(t, syncData.Channels, 3)
found := false

for _, chSet := range syncData.ChannelSet {
Expand Down
6 changes: 3 additions & 3 deletions rest/access_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func TestStarAccess(t *testing.T) {

// GET /db/_all_docs?channels=true
// Check that _all_docs returns the docs the user has access to:
response = rt.SendUserRequest("GET", "/db/_all_docs?channels=true", "", "bernard")
response = rt.SendUserRequest("GET", "/{{.keyspace}}/_all_docs?channels=true", "", "bernard")
if isAllDocsIndexExist {
RequireStatus(t, response, 200)

Expand Down Expand Up @@ -216,7 +216,7 @@ func TestStarAccess(t *testing.T) {

// GET /db/_all_docs?channels=true
// Check that _all_docs returns all docs (based on user * channel)
response = rt.SendUserRequest("GET", "/db/_all_docs?channels=true", "", "fran")
response = rt.SendUserRequest("GET", "/{{.keyspace}}/_all_docs?channels=true", "", "fran")
if isAllDocsIndexExist {
RequireStatus(t, response, 200)

Expand Down Expand Up @@ -266,7 +266,7 @@ func TestStarAccess(t *testing.T) {

// GET /db/_all_docs?channels=true
// Check that _all_docs only returns ! docs (based on doc ! channel)
response = rt.SendUserRequest("GET", "/db/_all_docs?channels=true", "", "manny")
response = rt.SendUserRequest("GET", "/{{.keyspace}}/_all_docs?channels=true", "", "manny")
if isAllDocsIndexExist {
RequireStatus(t, response, 200)
log.Printf("Response = %s", response.Body.Bytes())
Expand Down

0 comments on commit 1fda8d5

Please sign in to comment.