Moved prometheus monitoring into flask blueprint

This commit is contained in:
Bob Belnap
2022-09-05 15:04:35 -04:00
committed by Alok Saldanha
parent d5008893f7
commit 0f79e1a010
16 changed files with 339 additions and 293 deletions
+5 -1
View File
@@ -1,7 +1,9 @@
import unittest
from unittest.mock import MagicMock, Mock, patch
from cellxgene_gateway.gateway import app
from flask import Flask
from cellxgene_gateway.gateway_blueprint import gateway_blueprint
from cellxgene_gateway.items.item import ItemType
from cellxgene_gateway.items.s3.s3item import S3Item
from cellxgene_gateway.items.s3.s3item_source import S3ItemSource
@@ -82,6 +84,8 @@ class TestScanDirectory(unittest.TestCase):
s3func.return_value = S3Mock
source = S3ItemSource("my-bucket")
app = Flask(__name__)
app.register_blueprint(gateway_blueprint)
with app.test_request_context(query_string="refresh=true") as test_context:
tree = source.scan_directory()