[Groonga-commit] groonga/gcs [master] Define tables before try to delete the domain #30

Back to archive index

null+****@clear***** null+****@clear*****
2012年 7月 6日 (金) 14:34:31 JST


SHIMODA Hiroshi	2012-07-06 14:34:31 +0900 (Fri, 06 Jul 2012)

  New Revision: 755360331b2e18cbbd77606b8ef11ea3685f7bda
  https://github.com/groonga/gcs/commit/755360331b2e18cbbd77606b8ef11ea3685f7bda

  Log:
    Define tables before try to delete the domain #30

  Modified files:
    test/api-configuration.test.js

  Modified: test/api-configuration.test.js (+17 -17)
===================================================================
--- test/api-configuration.test.js    2012-07-06 14:31:41 +0900 (39417eb)
+++ test/api-configuration.test.js    2012-07-06 14:34:31 +0900 (f86e019)
@@ -41,8 +41,8 @@ suite('Configuration API', function() {
     temporaryDatabase.clear();
   });
 
-  test('Get, Action=DeleteDomain', function(done) {
-    var path = '/?DomainName=companies&Action=DeleteDomain&Version=2011-02-01';
+  test('Get, Action=CreateDomain', function(done) {
+    var path = '/?DomainName=companies&Action=CreateDomain&Version=2011-02-01';
     utils.get(path, {
                 'Host': 'cloudsearch.localhost'
               })
@@ -50,11 +50,11 @@ suite('Configuration API', function() {
         var expected = {
               statusCode: 200,
               body: '<?xml version="1.0"?>\n' +
-                    '<DeleteDomainResponse xmlns="' + XMLNS + '">' +
-                      '<DeleteDomainResult>' +
+                    '<CreateDomainResponse xmlns="' + XMLNS + '">' +
+                      '<CreateDomainResult>' +
                         '<DomainStatus>' +
-                          '<Created>false</Created>' +
-                          '<Deleted>true</Deleted>' +
+                          '<Created>true</Created>' +
+                          '<Deleted>false</Deleted>' +
                           '<DocService>' +
                             '<Endpoint>doc-companies-00000000000000000000000000.localhost</Endpoint>' +
                           '</DocService>' +
@@ -68,11 +68,11 @@ suite('Configuration API', function() {
                             '<Endpoint>search-companies-00000000000000000000000000.localhost</Endpoint>' +
                           '</SearchService>' +
                         '</DomainStatus>' +
-                      '</DeleteDomainResult>' +
+                      '</CreateDomainResult>' +
                       '<ResponseMetadata>' +
                         '<RequestId></RequestId>' +
                       '</ResponseMetadata>' +
-                    '</DeleteDomainResponse>'
+                    '</CreateDomainResponse>'
             };
         assert.deepEqual(response, expected);
 
@@ -92,8 +92,9 @@ suite('Configuration API', function() {
       });
   });
 
-  test('Get, Action=CreateDomain', function(done) {
-    var path = '/?DomainName=companies&Action=CreateDomain&Version=2011-02-01';
+  test('Get, Action=DeleteDomain', function(done) {
+    utils.loadDumpFile(database, __dirname + '/fixture/companies/ddl.grn');
+    var path = '/?DomainName=companies&Action=DeleteDomain&Version=2011-02-01';
     utils.get(path, {
                 'Host': 'cloudsearch.localhost'
               })
@@ -101,11 +102,11 @@ suite('Configuration API', function() {
         var expected = {
               statusCode: 200,
               body: '<?xml version="1.0"?>\n' +
-                    '<CreateDomainResponse xmlns="' + XMLNS + '">' +
-                      '<CreateDomainResult>' +
+                    '<DeleteDomainResponse xmlns="' + XMLNS + '">' +
+                      '<DeleteDomainResult>' +
                         '<DomainStatus>' +
-                          '<Created>true</Created>' +
-                          '<Deleted>false</Deleted>' +
+                          '<Created>false</Created>' +
+                          '<Deleted>true</Deleted>' +
                           '<DocService>' +
                             '<Endpoint>doc-companies-00000000000000000000000000.localhost</Endpoint>' +
                           '</DocService>' +
@@ -119,11 +120,11 @@ suite('Configuration API', function() {
                             '<Endpoint>search-companies-00000000000000000000000000.localhost</Endpoint>' +
                           '</SearchService>' +
                         '</DomainStatus>' +
-                      '</CreateDomainResult>' +
+                      '</DeleteDomainResult>' +
                       '<ResponseMetadata>' +
                         '<RequestId></RequestId>' +
                       '</ResponseMetadata>' +
-                    '</CreateDomainResponse>'
+                    '</DeleteDomainResponse>'
             };
         assert.deepEqual(response, expected);
 
@@ -144,7 +145,6 @@ suite('Configuration API', function() {
   });
 
   test('Get, Action=DefineIndexField', function(done) {
-    utils.loadDumpFile(database, __dirname + '/fixture/companies/ddl.grn');
     var path = '/?DomainName=companies&Action=CreateDomain&Version=2011-02-01';
     utils.get(path, {
                 'Host': 'cloudsearch.localhost'
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
下载 



Groonga-commit メーリングリストの案内
Back to archive index