Skip to content

Commit 2fbb18d

Browse files
author
Dan
committed
Split index save failure and save/load into separate tests
1 parent 5360de4 commit 2fbb18d

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

tests/test_influxdb_integration.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ def test_retention_policies(self):
748748
msg="Two datapoints in interval in retention policy, got %s from query" % (
749749
len(data_points)))
750750

751-
def test_index_save_load(self):
751+
def test_index_save_load_failure(self):
752752
self.finder.index.clear()
753753
del self.finder
754754
bad_index_path = 'bad_index'
@@ -784,12 +784,17 @@ def test_index_save_load(self):
784784
os.unlink(bad_index_path)
785785
except OSError:
786786
pass
787-
try:
788-
os.unlink('index')
789-
except OSError:
790-
pass
791-
del finder
792-
del config['search_index']
787+
788+
def test_index_save_load(self):
789+
config = { 'influxdb': { 'host' : 'localhost',
790+
'port' : 8086,
791+
'memcache' : {'host': 'localhost',},
792+
'user' : 'root',
793+
'pass' : 'root',
794+
'db' : self.db_name,
795+
},
796+
'statsd': {'host': 'localhost' },
797+
}
793798
finder = influxgraph.InfluxDBFinder(config)
794799
finder.index_path = 'index'
795800
finder.save_index()

0 commit comments

Comments
 (0)