11import base64
2+ import os
3+ import unittest
24from datetime import timedelta
35
46from ravendb import (
@@ -49,14 +51,17 @@ def _put_connection_string(self, name, database):
4951 self .store .maintenance .send (PutConnectionStringOperation (connection_string ))
5052 return name
5153
54+ @unittest .skipIf (os .environ .get ("RAVENDB_LICENSE" ) is None , "Insufficient license permissions. Skipping on CI/CD." )
5255 def test_can_put_pull_replication_as_hub (self ):
5356 result = self ._put_hub ("hub-1" )
5457 self .assertGreater (result .task_id , 0 )
5558
59+ @unittest .skipIf (os .environ .get ("RAVENDB_LICENSE" ) is None , "Insufficient license permissions. Skipping on CI/CD." )
5660 def test_can_put_pull_replication_as_hub_by_name (self ):
5761 result = self .store .maintenance .send (PutPullReplicationAsHubOperation (name = "hub-by-name" ))
5862 self .assertIsNotNone (result .task_id )
5963
64+ @unittest .skipIf (os .environ .get ("RAVENDB_LICENSE" ) is None , "Insufficient license permissions. Skipping on CI/CD." )
6065 def test_can_get_pull_replication_tasks_info (self ):
6166 result = self ._put_hub ("hub-info" , delay_replication_for = timedelta (seconds = 30 ))
6267
@@ -68,6 +73,7 @@ def test_can_get_pull_replication_tasks_info(self):
6873 self .assertEqual (timedelta (seconds = 30 ), info .definition .delay_replication_for )
6974 self .assertIsNotNone (info .ongoing_tasks )
7075
76+ @unittest .skipIf (os .environ .get ("RAVENDB_LICENSE" ) is None , "Insufficient license permissions. Skipping on CI/CD." )
7177 def test_can_update_pull_replication_as_sink (self ):
7278 connection_string_name = self ._put_connection_string ("cs-sink" , "sink-remote-db" )
7379 sink = PullReplicationAsSink (
@@ -88,6 +94,7 @@ def test_can_update_pull_replication_as_sink(self):
8894 self .assertEqual ("remote-hub" , info .hub_name )
8995 self .assertEqual ("my-sink" , info .task_name )
9096
97+ @unittest .skipIf (os .environ .get ("RAVENDB_LICENSE" ) is None , "Insufficient license permissions. Skipping on CI/CD." )
9198 def test_can_update_external_replication (self ):
9299 connection_string_name = self ._put_connection_string ("cs-ext" , "external-remote-db" )
93100 external = ExternalReplication (
@@ -100,11 +107,13 @@ def test_can_update_external_replication(self):
100107 self .assertIsNotNone (result )
101108 self .assertIsNotNone (result .task_id )
102109
110+ @unittest .skipIf (os .environ .get ("RAVENDB_LICENSE" ) is None , "Insufficient license permissions. Skipping on CI/CD." )
103111 def test_get_replication_hub_access_is_empty_for_new_hub (self ):
104112 self ._put_hub ("hub-no-access" )
105113 access = self .store .maintenance .send (GetReplicationHubAccessOperation ("hub-no-access" ))
106114 self .assertEqual ([], access )
107115
116+ @unittest .skipIf (os .environ .get ("RAVENDB_LICENSE" ) is None , "Insufficient license permissions. Skipping on CI/CD." )
108117 def test_register_replication_hub_access_for_missing_hub_raises (self ):
109118 access = ReplicationHubAccess (name = "sink-1" , certificate_base64 = _DUMMY_CERTIFICATE_B64 )
110119 operation = RegisterReplicationHubAccessOperation ("hub-that-does-not-exist" , access )
@@ -119,6 +128,7 @@ def test_register_replication_hub_access_for_missing_hub_raises(self):
119128 except RavenException as e :
120129 self .assertIn ("hub-that-does-not-exist" , str (e ))
121130
131+ @unittest .skipIf (os .environ .get ("RAVENDB_LICENSE" ) is None , "Insufficient license permissions. Skipping on CI/CD." )
122132 def test_unregister_replication_hub_access_is_noop_for_unknown_thumbprint (self ):
123133 self ._put_hub ("hub-unregister" )
124134 # Removing an unknown thumbprint from an existing hub must not raise.
0 commit comments