[Groonga-commit] groonga/gcs [master] Add tests for getDocumentsEndpoint/getSearchEndpoint about hostnames without port number

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Aug 23 14:56:46 JST 2012


YUKI Hiroshi	2012-08-23 14:56:46 +0900 (Thu, 23 Aug 2012)

  New Revision: a01a9ffc6a49b1c2fe7f6a73217094f9fcfd8b6c
  https://github.com/groonga/gcs/commit/a01a9ffc6a49b1c2fe7f6a73217094f9fcfd8b6c

  Log:
    Add tests for getDocumentsEndpoint/getSearchEndpoint about hostnames without port number

  Modified files:
    test/database-domain.test.js

  Modified: test/database-domain.test.js (+17 -3)
===================================================================
--- test/database-domain.test.js    2012-08-23 14:43:09 +0900 (abd7bc7)
+++ test/database-domain.test.js    2012-08-23 14:56:46 +0900 (bda7fac)
@@ -200,19 +200,33 @@ suite('database', function() {
         domain = new Domain('valid').setId(Domain.DEFAULT_ID);
       });
 
-      test('regular domain', function() {
+      test('regular domain, with port', function() {
         assert.equal(domain.getDocumentsEndpoint('my.domain:0123'),
                      'doc-valid-' + Domain.DEFAULT_ID + '.my.domain:0123');
       });
 
-      test('IP address', function() {
+      test('regular domain, without port', function() {
+        assert.equal(domain.getDocumentsEndpoint('my.domain'),
+                     'doc-valid-' + Domain.DEFAULT_ID + '.my.domain');
+      });
+
+      test('IP address, with port', function() {
         assert.equal(domain.getDocumentsEndpoint('192.168.0.1:4567'),
                      'doc-valid-' + Domain.DEFAULT_ID + '.192.168.0.1.xip.io:4567');
       });
 
-      test('localhost', function() {
+      test('IP address, without port', function() {
+        assert.equal(domain.getDocumentsEndpoint('192.168.0.1'),
+                     'doc-valid-' + Domain.DEFAULT_ID + '.192.168.0.1.xip.io');
+      });
+
+      test('localhost, with port', function() {
         assert.equal(domain.getDocumentsEndpoint('localhost:4567'),
                      'doc-valid-' + Domain.DEFAULT_ID + '.127.0.0.1.xip.io:4567');
+
+      test('localhost, without port', function() {
+        assert.equal(domain.getDocumentsEndpoint('localhost'),
+                     'doc-valid-' + Domain.DEFAULT_ID + '.127.0.0.1.xip.io');
       });
     });
 
-------------- next part --------------
HTML����������������������������...
下载 



More information about the Groonga-commit mailing list
Back to archive index