Skip to content

Commit 71b042a

Browse files
bors[bot]meili-botcurquiza
authored
Merge #145
145: Changes related to the next MeiliSearch release (v0.19.0) r=curquiza a=meili-bot This PR: - gathers the changes related to the next MeiliSearch release (v0.19.0) so that this package is ready when the official release is out. - should pass the tests against the [latest pre-release of MeiliSearch](https://github.com/meilisearch/MeiliSearch/releases). - might eventually contain test failures until the MeiliSearch v0.19.0 is out. ⚠️ This PR should NOT be merged until the next release of MeiliSearch (v0.19.0) is out. _This PR is auto-generated for the [pre-release week](https://github.com/meilisearch/integration-guides/blob/master/guides/pre-release-week.md) purpose._ Co-authored-by: meili-bot <[email protected]> Co-authored-by: Clémentine Urquizar <[email protected]>
2 parents 9f24e61 + 4e75198 commit 71b042a

File tree

2 files changed

+7
-26
lines changed

2 files changed

+7
-26
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ JSON output:
153153

154154
## 🤖 Compatibility with MeiliSearch
155155

156-
This package only guarantees the compatibility with the [version v0.18.1 of MeiliSearch](https://github.com/meilisearch/MeiliSearch/releases/tag/v0.18.1).
156+
This package only guarantees the compatibility with the [version v0.19.0 of MeiliSearch](https://github.com/meilisearch/MeiliSearch/releases/tag/v0.19.0).
157157

158158
## 💡 Learn More
159159

spec/meilisearch/index/documents_spec.rb

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@
276276
end
277277
end
278278

279-
context 'Wrong primary-key (attribute does not exist) added when pushing documents' do
279+
context 'Wrong primary-key (attribute does not exist) when pushing documents' do
280280
before(:all) do
281281
@uid = SecureRandom.hex(4)
282282
@client.create_index(@uid)
@@ -289,36 +289,17 @@
289289
{ unique: 3, id: 1, title: 'Le Rouge et le Noir' }
290290
end
291291

292-
it 'adds the primary-key but not the documents' do
292+
it 'does not add the primary key and the documents either' do
293293
response = index.update_documents(documents, 'objectId')
294294
expect(response).to be_a(Hash)
295295
expect(response).to have_key('updateId')
296296
sleep(0.2)
297-
expect(index.fetch_primary_key).to eq('objectId')
298-
expect(index.get_update_status(response['updateId'])['status']).to eq('failed')
299-
end
300-
301-
it 'succeeds to add document with the primary-key' do
302-
response = index.add_documents({ objectId: 1, title: 'Le Rouge et le Noir' }, 'id')
303-
expect(response).to be_a(Hash)
304-
expect(response).to have_key('updateId')
305-
sleep(0.2)
306-
expect(index.fetch_primary_key).to eq('objectId')
307-
expect(index.get_update_status(response['updateId'])['status']).to eq('processed')
308-
expect(index.documents.count).to eq(1)
309-
end
310-
311-
it 'does not take into account the new primary key' do
312-
response = index.add_documents({ id: 2, title: 'Le Petit Prince' }, 'id')
313-
expect(response).to be_a(Hash)
314-
expect(response).to have_key('updateId')
315-
sleep(0.2)
316-
expect(index.fetch_primary_key).to eq('objectId')
297+
expect(index.fetch_primary_key).to be_nil
317298
expect(index.get_update_status(response['updateId'])['status']).to eq('failed')
318299
end
319300
end
320301

321-
context 'Wrong primary-key (attribute bad formatted) added when pushing documents' do
302+
context 'Wrong primary-key (attribute bad formatted) when pushing documents' do
322303
before(:all) do
323304
@uid = SecureRandom.hex(4)
324305
@client.create_index(@uid)
@@ -331,12 +312,12 @@
331312
{ id: 1, title: 'Le Rouge et le Noir' }
332313
end
333314

334-
it 'adds the primary-key but not the documents' do
315+
it 'does not add the primary key and the documents either' do
335316
response = index.add_documents(documents, 'title')
336317
expect(response).to be_a(Hash)
337318
expect(response).to have_key('updateId')
338319
sleep(0.2)
339-
expect(index.fetch_primary_key).to eq('title')
320+
expect(index.fetch_primary_key).to be_nil
340321
expect(index.get_update_status(response['updateId'])['status']).to eq('failed')
341322
expect(index.documents.count).to eq(0)
342323
end

0 commit comments

Comments
 (0)