Skip to content

Commit

Permalink
test runs on edge only
Browse files Browse the repository at this point in the history
  • Loading branch information
ashtul committed Dec 5, 2020
1 parent 0927ba8 commit 028d108
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ def check_version_2(env):
return True
return False

def check_edge(env):
v = env.execute_command('MODULE LIST')[0][3]
if v is "999999":
return True
return False

class RedisSearchTestCase(ModuleTestCase('../module.so')):

def createIndex(self, client, num_docs = 100, definition=None):
Expand Down Expand Up @@ -230,6 +236,8 @@ def testPayloads(self):
conn = self.redis()

with conn as r:
if not check_edge(r):
return
# Creating a client with a given index name
client = Client('idx', port=conn.port)
client.redis.flushdb()
Expand Down Expand Up @@ -802,6 +810,8 @@ def testGet(self):

def testConfig(self):
client = self.getCleanClient('idx')
if not check_edge(client.redis):
return
self.assertTrue(client.config_set('TIMEOUT', '100'))
with self.assertRaises(redis.ResponseError) as error:
client.config_set('TIMEOUT', "null")
Expand Down

0 comments on commit 028d108

Please sign in to comment.