Skip to content

Commit

Permalink
fix: removed unused flag
Browse files Browse the repository at this point in the history
f
  • Loading branch information
fstagni committed Aug 13, 2024
1 parent 1ae84a7 commit 49ece32
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/DIRAC/MonitoringSystem/DB/MonitoringDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
class MonitoringDB(ElasticDB):
"""Extension of ElasticDB for Monitoring system DB"""

def __init__(self, name="Monitoring/MonitoringDB", readOnly=False):
def __init__(self, name="Monitoring/MonitoringDB"):
"""Standard constructor"""

try:
Expand All @@ -55,7 +55,6 @@ def __init__(self, name="Monitoring/MonitoringDB", readOnly=False):
self.log.error("Can't connect to MonitoringDB", repr(ex))
raise ex

self.__readonly = readOnly
self.documentTypes = {}

# loads all monitoring indexes and types.
Expand Down
10 changes: 6 additions & 4 deletions tests/Integration/Core/Test_ElasticsearchDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_bulkindex():
assert result["Value"] == 10
time.sleep(5)
indexes = elasticSearchDB.getIndexes()
assert type(indexes) == list
assert isinstance(indexes, list) # it will be list
for index in indexes:
res = elasticSearchDB.deleteIndex(index)
assert res["OK"]
Expand All @@ -101,7 +101,7 @@ def test_bulkindexMonthly():
assert result["Value"] == 10
time.sleep(5)
indexes = elasticSearchDB.getIndexes()
assert type(indexes) == list
assert isinstance(indexes, list) # it will be list
for index in indexes:
res = elasticSearchDB.deleteIndex(index)
assert res["OK"]
Expand Down Expand Up @@ -496,8 +496,10 @@ def test_Search():
# assertEqual(result.aggregations['2'].buckets[1]['end_data'].buckets[0].avg_buckets, {u'value': 4})
@pytest.fixture
def setUpAndTearDown():
result = elasticSearchDB.createIndex("my-index", {})
assert result["OK"]
res = elasticSearchDB.existingIndex("my-index")
if not res["OK"] or not res["Value"]:
result = elasticSearchDB.createIndex("my-index", {}, period=None)
assert result["OK"]
result = elasticSearchDB.index(
indexName="my-index", body={"quantity": 1, "Product": "a", "timestamp": 1458226213000}, docID=1
)
Expand Down

0 comments on commit 49ece32

Please sign in to comment.