예제 #1
0
 def test_define_orderers(self):
     res = define_orderers(["ord0", "ord1"],
                           ["ord0.local-cluster", "ord1.local-cluster"])
     assert res == {
         "ord0": {
             "url": "grpc://ord0.local-cluster:7050"
         },
         "ord1": {
             "url": "grpc://ord1.local-cluster:7050"
         },
     }
 def test_define_orderers(self):
     res = define_orderers(['ord0', 'ord1'],
                           ['ord0.local-cluster', 'ord1.local-cluster'])
     assert res == {
         'ord0': {
             'url': 'grpc://ord0.local-cluster:7050'
         },
         'ord1': {
             'url': 'grpc://ord1.local-cluster:7050'
         },
     }
 def test_define_orderers_domain(self):
     res = define_orderers(['ord0', 'ord1'],
                           ['ord0.local-cluster', 'ord1.local-cluster'],
                           domain='a-domain.com')
     assert res == {
         'ord0.a-domain.com': {
             'url': 'grpc://ord0.local-cluster:7050'
         },
         'ord1.a-domain.com': {
             'url': 'grpc://ord1.local-cluster:7050'
         },
     }
예제 #4
0
 def test_define_orderers_domain(self):
     res = define_orderers(
         ["ord0", "ord1"],
         ["ord0.local-cluster", "ord1.local-cluster"],
         domain="a-domain.com",
     )
     assert res == {
         "ord0.a-domain.com": {
             "url": "grpc://ord0.local-cluster:7050"
         },
         "ord1.a-domain.com": {
             "url": "grpc://ord1.local-cluster:7050"
         },
     }