null+****@clear*****
null+****@clear*****
2012年 8月 2日 (木) 13:29:12 JST
SHIMODA Hiroshi 2012-08-02 13:29:12 +0900 (Thu, 02 Aug 2012) New Revision: 6ed1115e3e5bbbd7672692b9d2eb6af904d89d4f https://github.com/groonga/gcs/commit/6ed1115e3e5bbbd7672692b9d2eb6af904d89d4f Log: Compare API response with internal states of the domain Modified files: test/api-configuration.test.js Modified: test/api-configuration.test.js (+18 -17) =================================================================== --- test/api-configuration.test.js 2012-08-02 13:25:59 +0900 (ba94b38) +++ test/api-configuration.test.js 2012-08-02 13:29:12 +0900 (5f3622b) @@ -243,16 +243,16 @@ suite('Configuration API', function() { Created: 'true', Deleted: 'false', DocService: { - Endpoint: 'doc-companies-' + Domain.DEFAULT_ID + '.localhost' + Endpoint: domain.getDocumentsEndpoint('localhost') }, - DomainId: Domain.DEFAULT_ID + '/companies', - DomainName: 'companies', - NumSearchableDocs: '0', - RequiresIndexDocuments: 'false', - SearchInstanceCount: '0', - SearchPartitionCount: '0', + DomainId: domain.domainId, + DomainName: domain.name, + NumSearchableDocs: String(domain.searchableDocumentsCount), + RequiresIndexDocuments: String(domain.requiresIndexDocuments), + SearchInstanceCount: String(domain.searchInstanceCount), + SearchPartitionCount: String(domain.searchPartitionCount), SearchService: { - Endpoint: 'search-companies-' + Domain.DEFAULT_ID + '.localhost' + Endpoint: domain.getSearchEndpoint('localhost') } }; var status = response.body.CreateDomainResponse.CreateDomainResult.DomainStatus; @@ -274,7 +274,8 @@ suite('Configuration API', function() { 'Host': 'cloudsearch.localhost' }) .next(function(response) { - assert.isFalse((new Domain('companies', context).exists())); + var domain = new Domain('companies', context); + assert.isFalse(domain.exists()); response = toParsedResponse(response); assert.deepEqual(response.pattern, @@ -284,16 +285,16 @@ suite('Configuration API', function() { Created: 'false', Deleted: 'true', DocService: { - Endpoint: 'doc-companies-' + Domain.DEFAULT_ID + '.localhost' + Endpoint: domain.getDocumentsEndpoint('localhost') }, - DomainId: Domain.DEFAULT_ID + '/companies', - DomainName: 'companies', - NumSearchableDocs: '0', - RequiresIndexDocuments: 'false', - SearchInstanceCount: '0', - SearchPartitionCount: '0', + DomainId: domain.domainId, + DomainName: domain.name, + NumSearchableDocs: String(domain.searchableDocumentsCount), + RequiresIndexDocuments: String(domain.requiresIndexDocuments), + SearchInstanceCount: String(domain.searchInstanceCount), + SearchPartitionCount: String(domain.searchPartitionCount), SearchService: { - Endpoint: 'search-companies-' + Domain.DEFAULT_ID + '.localhost' + Endpoint: domain.getSearchEndpoint('localhost') } }; var status = response.body.DeleteDomainResponse.DeleteDomainResult.DomainStatus; -------------- next part -------------- HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B... 下載