summaryrefslogtreecommitdiffstats
path: root/utils/test
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-06-17 10:06:24 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-06-17 10:06:24 +0000
commit8077b5b76347b5698c32f60efce95a212e150739 (patch)
treeb5c5197635a893e4d669334948cb6fc13cb0d94d /utils/test
parent89208b0686b032a3298ee4b4f4a7da013bb0cfdf (diff)
parenteded85550df1dc11ebcd36757cadc7103fa9dca9 (diff)
Merge "adapt mong_to_elasticsearch.py to testAPI"
Diffstat (limited to 'utils/test')
-rw-r--r--utils/test/scripts/mongo_to_elasticsearch.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/test/scripts/mongo_to_elasticsearch.py b/utils/test/scripts/mongo_to_elasticsearch.py
index caa68d8d0..8c36d3007 100644
--- a/utils/test/scripts/mongo_to_elasticsearch.py
+++ b/utils/test/scripts/mongo_to_elasticsearch.py
@@ -365,7 +365,7 @@ def modify_mongo_entry(testcase):
def publish_mongo_data(output_destination):
tmp_filename = 'mongo-{}.log'.format(uuid.uuid4())
try:
- subprocess.check_call(['mongoexport', '--db', 'test_results_collection', '-c', 'test_results', '--out',
+ subprocess.check_call(['mongoexport', '--db', 'test_results_collection', '-c', 'results', '--out',
tmp_filename])
with open(tmp_filename) as fobj:
for mongo_json_line in fobj:
@@ -379,7 +379,7 @@ def publish_mongo_data(output_destination):
def get_mongo_data(days):
past_time = datetime.datetime.today() - datetime.timedelta(days=days)
- mongo_json_lines = subprocess.check_output(['mongoexport', '--db', 'test_results_collection', '-c', 'test_results',
+ mongo_json_lines = subprocess.check_output(['mongoexport', '--db', 'test_results_collection', '-c', 'results',
'--query', '{{"creation_date":{{$gt:"{}"}}}}'
.format(past_time)]).splitlines()
@@ -428,7 +428,7 @@ if __name__ == '__main__':
help='the url of mongodb, defaults to http://localhost:8082')
args = parser.parse_args()
- base_elastic_url = urlparse.urljoin(args.elasticsearch_url, '/test_results/mongo2elastic')
+ base_elastic_url = urlparse.urljoin(args.elasticsearch_url, '/results/mongo2elastic')
output_destination = args.output_destination
days = args.merge_latest
es_user = args.elasticsearch_username