Skip to content

Commit

Permalink
fix for test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
gregns1 committed Nov 17, 2023
1 parent a90f82b commit 326a222
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rest/bootstrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,14 @@ func TestBootstrapRESTAPISetup(t *testing.T) {
require.Nil(t, dbConfigResp.Sync)
require.Equal(t, uint32(1234), *dbConfigResp.CacheConfig.RevCacheConfig.Size)

dbContext := sc.databases_["db1"]
bucketUUID := dbContext.BucketUUID
// Sanity check to use the database
resp = BootstrapAdminRequest(t, http.MethodPut, "/db1/doc1", `{"foo":"bar"}`)
resp.RequireResponse(http.StatusCreated, `{"id":"doc1","ok":true,"rev":"1-cd809becc169215072fd567eebd8b8de"}`)
collection := db.GetSingleDatabaseCollection(t, dbContext)
fetchedDoc, _, err := collection.GetDocWithXattr(ctx, "doc1", db.DocUnmarshalCAS)
require.NoError(t, err)
resp.RequireResponse(http.StatusCreated, fmt.Sprintf(`{"id":"doc1","ok":true,"rev":"1-cd809becc169215072fd567eebd8b8de", "current_version": {"source_id":"%s", "version": %d}}`, bucketUUID, fetchedDoc.Cas))
resp = BootstrapAdminRequest(t, http.MethodGet, "/db1/doc1", ``)
resp.RequireResponse(http.StatusOK, `{"_id":"doc1","_rev":"1-cd809becc169215072fd567eebd8b8de","foo":"bar"}`)

Expand Down

0 comments on commit 326a222

Please sign in to comment.