back connection is localhost
@@ -12,7 +12,10 @@ def client():
def test_setup_redis():
+ try:
r = redis.StrictRedis(host='redis', port=6379, db=0, decode_responses=True)
+ except Exception as e:
+ r = redis.StrictRedis(host='localhost', port=6379, db=0, decode_responses=True)
r.sadd('ip_addresses', '10.0.0.1')
r.hmset('10.0.0.1', {'poseidon_hash': '6cd09124a66ef1bbc72c1aff4e333766d3533f81'})
r.hmset('6cd09124a66ef1bbc72c1aff4e333766d3533f81', {"transition_time":"1524623228.1019075", "prev_state":"None", "endpoint_data":"{'name': None, 'mac': '00:00:00:00:00:01', 'ip-address': '10.0.0.1', 'segment': '1', 'port': '1', 'tenant': 'VLAN100'}", "next_state":"REINVESTIGATING", "state":"KNOWN"})
