Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
1101-1 committed Nov 26, 2024
1 parent fce7179 commit 8aebcb7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
18 changes: 9 additions & 9 deletions plugins/gcp/fix_plugin_gcp/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@

log = logging.getLogger("fix.plugins.gcp")
all_resources: List[Type[GcpResource]] = (
# compute.resources
# + container.resources
# + billing.resources
# + sqladmin.resources
# + storage.resources
# + aiplatform.resources
# + firestore.resources
# + filestore.resources
cloudfunctions.resources
compute.resources
+ container.resources
+ billing.resources
+ sqladmin.resources
+ storage.resources
+ aiplatform.resources
+ firestore.resources
+ filestore.resources
+ cloudfunctions.resources
)


Expand Down
12 changes: 6 additions & 6 deletions plugins/gcp/test/test_monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ def test_metric(random_builder: GraphBuilder) -> None:
read = GcpMonitoringQuery.create(
query_name="compute.googleapis.com/instance/disk/read_ops_count",
period=timedelta(hours=1),
ref_id="random_instance",
resource_name="random_instance",
ref_id="gcp_instance/random_instance/global",
metric_name=MetricName.DiskRead,
normalization=normalizer_factory.count,
stat="ALIGN_MIN",
label_name="instance_name",
project_id=random_builder.project.id,
metric_filters={"metric.labels.instance_name": "random_instance", "resource.labels.zone": "global"},
)
write = GcpMonitoringQuery.create(
query_name="compute.googleapis.com/instance/disk/write_ops_count",
period=timedelta(hours=1),
ref_id="random_instance",
resource_name="random_instance",
ref_id="gcp_instance/random_instance/global",
metric_name=MetricName.DiskWrite,
normalization=normalizer_factory.count,
stat="ALIGN_MIN",
label_name="instance_name",
project_id=random_builder.project.id,
metric_filters={"metric.labels.instance_name": "random_instance", "resource.labels.zone": "global"},
)
result = GcpMonitoringMetricData.query_for(random_builder, [read, write], earlier, now)
assert all(value > 0 for value in result[read].metric_values or [])
Expand Down

0 comments on commit 8aebcb7

Please sign in to comment.