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

アーカイブの一覧に戻る

YUKI Hiroshi null+****@clear*****
Thu Aug 23 15:05:30 JST 2012


YUKI Hiroshi	2012-08-23 15:05:30 +0900 (Thu, 23 Aug 2012)

  New Revision: 28766b7c4c129826c11324fe2df1bbe634541640
  https://github.com/groonga/gcs/commit/28766b7c4c129826c11324fe2df1bbe634541640

  Log:
    Add tests for getSearchEndpoint about hostnames without port number

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

  Modified: test/database-domain.test.js (+18 -3)
===================================================================
--- test/database-domain.test.js    2012-08-23 14:57:37 +0900 (22f09ce)
+++ test/database-domain.test.js    2012-08-23 15:05:30 +0900 (56fed49)
@@ -237,20 +237,35 @@ suite('database', function() {
         domain = new Domain('valid').setId(Domain.DEFAULT_ID);
       });
 
-      test('regular domain', function() {
+      test('regular domain, with port', function() {
         assert.equal(domain.getSearchEndpoint('my.domain:0123'),
                      'search-valid-' + Domain.DEFAULT_ID + '.my.domain:0123');
       });
 
-      test('IP address', function() {
+      test('regular domain, without port', function() {
+        assert.equal(domain.getSearchEndpoint('my.domain'),
+                     'search-valid-' + Domain.DEFAULT_ID + '.my.domain');
+      });
+
+      test('IP address, with port', function() {
         assert.equal(domain.getSearchEndpoint('192.168.0.1:4567'),
                      'search-valid-' + Domain.DEFAULT_ID + '.192.168.0.1.xip.io:4567');
       });
 
-      test('localhost', function() {
+      test('IP address, without port', function() {
+        assert.equal(domain.getSearchEndpoint('192.168.0.1'),
+                     'search-valid-' + Domain.DEFAULT_ID + '.192.168.0.1.xip.io');
+      });
+
+      test('localhost, with port', function() {
         assert.equal(domain.getSearchEndpoint('localhost:4567'),
                      'search-valid-' + Domain.DEFAULT_ID + '.127.0.0.1.xip.io:4567');
       });
+
+      test('localhost, without port', function() {
+        assert.equal(domain.getSearchEndpoint('localhost'),
+                     'search-valid-' + Domain.DEFAULT_ID + '.127.0.0.1.xip.io');
+      });
     });
 
     suite('getting data from database', function() {
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る