Skip to content

Commit

Permalink
Merge pull request #108 from kuzzleio/kuz-318-mutli-index
Browse files Browse the repository at this point in the history
[BREAKING] Kuz 318 mutli index
  • Loading branch information
scottinet committed Dec 18, 2015
2 parents a12f6ab + c3f3da3 commit a4bafd8
Show file tree
Hide file tree
Showing 90 changed files with 3,074 additions and 1,569 deletions.
4 changes: 4 additions & 0 deletions .kuzzlerc
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@
"admin": {
"_id": "admin",
"indexes": {
"_canCreate": true,
"*": {
"collections": {
"_canCreate": true,
"*": {
"controllers": {
"*": {
Expand All @@ -70,8 +72,10 @@
"guest": {
"_id": "guest",
"indexes": {
"_canCreate": true,
"*": {
"collections": {
"_canCreate": true,
"*": {
"controllers": {
"*": {
Expand Down
14 changes: 12 additions & 2 deletions features/AMQP.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Feature: Test AMQP API
When I write the document
Then I should receive a document id
Then I'm able to get the document
And I'm not able to get the document in index "index-test-alt"

@usingAMQP @unsubscribe
Scenario: Create or Update a document
Expand All @@ -39,7 +40,8 @@ Feature: Test AMQP API
@usingAMQP
Scenario: Search a document
When I write the document "documentGrace"
Then I find a document with "grace" in field "firstName"
And I find a document with "grace" in field "firstName"
And I don't find a document with "grace" in field "firstName" in index "index-test-alt"

@usingAMQP
Scenario: Bulk import
Expand All @@ -64,6 +66,7 @@ Feature: Test AMQP API
When I write the document "documentGrace"
When I write the document "documentAda"
Then I count 4 documents
And I count 0 documents in index "index-test-alt"
And I count 2 documents with "NYC" in field "city"
Then I truncate the collection
And I count 0 documents
Expand Down Expand Up @@ -196,4 +199,11 @@ Feature: Test AMQP API
Then In my list there is a collection "kuzzle-collection-test" with 2 room and 2 subscriber
When I remove the first room
And I get the list subscriptions
Then In my list there is a collection "kuzzle-collection-test" with 1 room and 1 subscriber
Then In my list there is a collection "kuzzle-collection-test" with 1 room and 1 subscriber

@usingAMQP
Scenario: create additional index
When I create an index named "my-new-index"
Then I'm able to find the index named "my-new-index" in index list
Then I'm not able to find the index named "my-undefined-index" in index list
Then I'm able to delete the index named "my-new-index"
12 changes: 11 additions & 1 deletion features/MQTT.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Feature: Test MQTT API
When I write the document
Then I should receive a document id
Then I'm able to get the document
And I'm not able to get the document in index "index-test-alt"

@usingMQTT @unsubscribe
Scenario: Create or Update a document
Expand All @@ -40,6 +41,7 @@ Feature: Test MQTT API
Scenario: Search a document
When I write the document "documentGrace"
Then I find a document with "grace" in field "firstName"
And I don't find a document with "grace" in field "firstName" in index "index-test-alt"

@usingMQTT
Scenario: Bulk import
Expand All @@ -64,6 +66,7 @@ Feature: Test MQTT API
When I write the document "documentGrace"
When I write the document "documentAda"
Then I count 4 documents
And I count 0 documents in index "index-test-alt"
And I count 2 documents with "NYC" in field "city"
Then I truncate the collection
And I count 0 documents
Expand Down Expand Up @@ -196,4 +199,11 @@ Feature: Test MQTT API
Then In my list there is a collection "kuzzle-collection-test" with 2 room and 2 subscriber
When I remove the first room
And I get the list subscriptions
Then In my list there is a collection "kuzzle-collection-test" with 1 room and 1 subscriber
Then In my list there is a collection "kuzzle-collection-test" with 1 room and 1 subscriber

@usingMQTT
Scenario: create additional index
When I create an index named "my-new-index"
Then I'm able to find the index named "my-new-index" in index list
Then I'm not able to find the index named "my-undefined-index" in index list
Then I'm able to delete the index named "my-new-index"
12 changes: 11 additions & 1 deletion features/REST.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Feature: Test REST API
When I publish a message
Then I should receive a request id
Then I'm not able to get the document
And I'm not able to get the document in index "index-test-alt"

@usingREST
Scenario: Create a new document and get it
Expand Down Expand Up @@ -37,6 +38,7 @@ Feature: Test REST API
Scenario: Search a document
When I write the document "documentGrace"
Then I find a document with "grace" in field "firstName"
And I don't find a document with "grace" in field "firstName" in index "index-test-alt"

@usingREST
Scenario: Bulk import
Expand All @@ -61,11 +63,12 @@ Feature: Test REST API
When I write the document "documentGrace"
When I write the document "documentAda"
Then I count 4 documents
And I count 0 documents in index "index-test-alt"
And I count 2 documents with "NYC" in field "city"
Then I truncate the collection
And I count 0 documents

@usingREST @removeSchema
@usingREST
Scenario: Change mapping
When I write the document "documentGrace"
Then I don't find a document with "Grace" in field "firstName"
Expand Down Expand Up @@ -100,3 +103,10 @@ Feature: Test REST API
Scenario: get the Kuzzle timestamp
When I get the server timestamp
Then I can read the timestamp

@usingREST
Scenario: create additional index
When I create an index named "my-new-index"
Then I'm able to find the index named "my-new-index" in index list
Then I'm not able to find the index named "my-undefined-index" in index list
Then I'm able to delete the index named "my-new-index"
14 changes: 12 additions & 2 deletions features/STOMP.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Feature: Test STOMP API
When I write the document
Then I should receive a document id
Then I'm able to get the document
And I'm not able to get the document in index "index-test-alt"

@usingSTOMP @unsubscribe
Scenario: Create or Update a document
Expand All @@ -39,7 +40,8 @@ Feature: Test STOMP API
@usingSTOMP
Scenario: Search a document
When I write the document "documentGrace"
Then I find a document with "grace" in field "firstName"
And I find a document with "grace" in field "firstName"
And I don't find a document with "grace" in field "firstName" in index "index-test-alt"

@usingSTOMP
Scenario: Bulk import
Expand All @@ -64,6 +66,7 @@ Feature: Test STOMP API
When I write the document "documentGrace"
When I write the document "documentAda"
Then I count 4 documents
And I count 0 documents in index "index-test-alt"
And I count 2 documents with "NYC" in field "city"
Then I truncate the collection
And I count 0 documents
Expand Down Expand Up @@ -196,4 +199,11 @@ Feature: Test STOMP API
Then In my list there is a collection "kuzzle-collection-test" with 2 room and 2 subscriber
When I remove the first room
And I get the list subscriptions
Then In my list there is a collection "kuzzle-collection-test" with 1 room and 1 subscriber
Then In my list there is a collection "kuzzle-collection-test" with 1 room and 1 subscriber

@usingSTOMP
Scenario: create additional index
When I create an index named "my-new-index"
Then I'm able to find the index named "my-new-index" in index list
Then I'm not able to find the index named "my-undefined-index" in index list
Then I'm able to delete the index named "my-new-index"
16 changes: 14 additions & 2 deletions features/Websocket.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Feature: Test websocket API
When I write the document
Then I should receive a document id
Then I'm able to get the document
And I'm not able to get the document in index "index-test-alt"

@usingWebsocket @unsubscribe
Scenario: Create or Update a document
Expand All @@ -39,7 +40,9 @@ Feature: Test websocket API
@usingWebsocket
Scenario: Search a document
When I write the document "documentGrace"
And I wait 1s
Then I find a document with "grace" in field "firstName"
And I don't find a document with "grace" in field "firstName" in index "index-test-alt"

@usingWebsocket
Scenario: Bulk import
Expand All @@ -64,18 +67,20 @@ Feature: Test websocket API
When I write the document "documentGrace"
When I write the document "documentAda"
Then I count 4 documents
And I count 0 documents in index "index-test-alt"
And I count 2 documents with "NYC" in field "city"
Then I truncate the collection
And I count 0 documents

@removeSchema @usingWebsocket
@usingWebsocket
Scenario: Change mapping
When I write the document "documentGrace"
Then I don't find a document with "Grace" in field "firstName"
Then I remove the collection and schema
Then I wait 1s
Then I change the schema
When I write the document "documentGrace"
And I wait 1s
Then I find a document with "Grace" in field "firstName"

@usingWebsocket @unsubscribe
Expand Down Expand Up @@ -196,4 +201,11 @@ Feature: Test websocket API
Then In my list there is a collection "kuzzle-collection-test" with 2 room and 2 subscriber
When I remove the first room
And I get the list subscriptions
Then In my list there is a collection "kuzzle-collection-test" with 1 room and 1 subscriber
Then In my list there is a collection "kuzzle-collection-test" with 1 room and 1 subscriber

@usingWebsocket
Scenario: create additional index
When I create an index named "my-new-index"
Then I'm able to find the index named "my-new-index" in index list
Then I'm not able to find the index named "my-undefined-index" in index list
Then I'm able to delete the index named "my-new-index"
Loading

0 comments on commit a4bafd8

Please sign in to comment.