null+****@clear*****
null+****@clear*****
2012年 8月 2日 (木) 15:20:52 JST
SHIMODA Hiroshi 2012-08-02 15:20:52 +0900 (Thu, 02 Aug 2012) New Revision: 4d0fc4887e22995b4c24c3d73b54a1403a5ee7bd https://github.com/groonga/gcs/commit/4d0fc4887e22995b4c24c3d73b54a1403a5ee7bd Log: Use Domain#exists() and IndexField#exists() sintead of dump for assertion of reindexing Modified files: test/api-configuration.test.js Modified: test/api-configuration.test.js (+4 -15) =================================================================== --- test/api-configuration.test.js 2012-08-02 15:17:06 +0900 (8988747) +++ test/api-configuration.test.js 2012-08-02 15:20:52 +0900 (acd49ca) @@ -531,21 +531,10 @@ suite('Configuration API', function() { .get('/?DomainName=companies&' + 'Action=IndexDocuments&Version=2011-02-01') .next(function(response) { - var dump = context.commandSync('dump', { - tables: 'companies' - }); - var expected = 'table_create companies_00000000000000000000000000 TABLE_HASH_KEY ShortText\n' + - 'column_create companies_00000000000000000000000000 age COLUMN_SCALAR UInt32\n' + - 'column_create companies_00000000000000000000000000 name COLUMN_SCALAR ShortText\n' + - 'table_create companies_00000000000000000000000000_BigramTerms ' + - 'TABLE_PAT_KEY|KEY_NORMALIZE ShortText ' + - '--default_tokenizer TokenBigram\n' + - 'table_create companies_00000000000000000000000000_age TABLE_HASH_KEY UInt32\n' + - 'column_create companies_00000000000000000000000000_age companies_00000000000000000000000000_age ' + - 'COLUMN_INDEX|WITH_POSITION companies_00000000000000000000000000 age\n' + - 'column_create companies_00000000000000000000000000_BigramTerms companies_00000000000000000000000000_name ' + - 'COLUMN_INDEX|WITH_POSITION companies_00000000000000000000000000 name'; - assert.equal(dump, expected); + var domain = new Domain('companies', context); + assert.isTrue(domain.exists()); + assert.isTrue(domain.getIndexField('name').exists()); + assert.isTrue(domain.getIndexField('age').exists()); var expectedFieldNames = ['age', 'name']; response = toParsedResponse(response); -------------- next part -------------- HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...Download