Hello, Dmitriy! In this particular case, scenario “Put item to INSERT 1 attribute (an existing table, 1 correct attribute “S”)". It means that we want put one item with one attribute of type "S" to existing table.
In terms of DynamoDB Item ( https://github.com/stackforge/magnetodb/blob/master/tempest/api/keyvalue/stable/rest/test_put_item.py#L38): A map of attribute name/value pairs, one for each attribute. Only the primary key attributes are required; you can optionally provide other attribute name-value pairs for the item. You must provide all of the attributes for the primary key. For example, with a hash type primary key, you only need to specify the hash attribute. For a hash-and-range type primary key, you must specify both the hash attribute and the range attribute. (In our test case we have only one attribute value in attribute defenition and key schema, table without index) If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition. For the test case we have created the following table: Create table ( https://github.com/stackforge/magnetodb/blob/master/tempest/api/keyvalue/stable/rest/test_put_item.py#L34 ). We creating table with request: POST http://127.0.0.1:8480/v1/default_tenant/data/tables ; and request body: { "key_schema": [ { "key_type": "HASH", "attribute_name": "message" } ], "table_name": "testtempest757038441", "attribute_definitions": [ { "attribute_type": "S", "attribute_name": "message" } ]} Put Item ( https://github.com/stackforge/magnetodb/blob/master/tempest/api/keyvalue/stable/rest/test_put_item.py#L41 ): After successful creating table we put item with request: POST http://127.0.0.1:8480/v1/default_tenant/data/tables/testtempest757038441/put_item and request body: { "item": { "message": { "S": "message_text" } } } Expected response is: Response Status: 200 Response Body: {} Actual response is: Response Status: 200 Response Body: {} Such behavior is equivalent to DynamoDB. What seems to be incorrect in this test case? Best Regards, Aleksandr Minakov Junior Software Engineer Mirantis, Inc Skype: m._.a._.g Phone: +38 095 043 06 43 On Thu, Apr 24, 2014 at 9:34 AM, Dmitriy Ukhlov <dukh...@mirantis.com>wrote: > Hello everyone! > > I found out that some MagnetoDB tests use test data with empty value. Is > it correct? > Is DynamoDB allows such behavior? Please take a look: > > https://github.com/stackforge/magnetodb/blob/master/tempest/api/keyvalue/stable/rest/test_put_item.py#L39 > > -- > Best regards, > Dmitriy Ukhlov > Mirantis Inc. > > _______________________________________________ > OpenStack-dev mailing list > OpenStack-dev@lists.openstack.org > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev >
_______________________________________________ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev