mirror of
https://github.com/google/nomulus
synced 2026-09-20 06:54:43 +00:00
Inject the BigQuery streaming metrics queue
This makes local development easier by allowing a stub to be injected for the queue. Based on Justin Graham's PR: https://github.com/google/nomulus/pull/51 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=144439454
This commit is contained in:
@@ -14,7 +14,9 @@
|
||||
|
||||
package google.registry.monitoring.whitebox;
|
||||
|
||||
import static com.google.appengine.api.taskqueue.QueueFactory.getQueue;
|
||||
import static google.registry.bigquery.BigqueryUtils.toBigqueryTimestamp;
|
||||
import static google.registry.monitoring.whitebox.BigQueryMetricsEnqueuer.QUEUE_BIGQUERY_STREAMING_METRICS;
|
||||
import static google.registry.testing.TaskQueueHelper.assertTasksEnqueued;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
@@ -59,6 +61,7 @@ public class BigQueryMetricsEnqueuerTest {
|
||||
enqueuer = new BigQueryMetricsEnqueuer();
|
||||
enqueuer.idGenerator = Suppliers.ofInstance("laffo");
|
||||
enqueuer.modulesService = modulesService;
|
||||
enqueuer.queue = getQueue(QUEUE_BIGQUERY_STREAMING_METRICS);
|
||||
when(modulesService.getVersionHostname(Matchers.anyString(), Matchers.anyString()))
|
||||
.thenReturn("1.backend.test.localhost");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user