Skip to content

Commit

Permalink
Remove fmt function
Browse files Browse the repository at this point in the history
  • Loading branch information
andriikushch committed Jan 3, 2025
1 parent be53ff3 commit 625f1b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ func TestAccDataSourceAWSCloudWatchScrapeJob(t *testing.T) {
resource.TestCheckResourceAttr("data.grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "custom_namespace.0.metric.0.statistics.#", fmt.Sprintf("%d", len(testAWSCloudWatchScrapeJobData.CustomNamespaces[0].Metrics[0].Statistics))),
resource.TestCheckResourceAttr("data.grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "custom_namespace.0.metric.0.statistics.0", testAWSCloudWatchScrapeJobData.CustomNamespaces[0].Metrics[0].Statistics[0]),
resource.TestCheckResourceAttr("data.grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "custom_namespace.0.scrape_interval_seconds", fmt.Sprintf("%d", testAWSCloudWatchScrapeJobData.CustomNamespaces[0].ScrapeIntervalSeconds)),
resource.TestCheckResourceAttr("data.grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "static_labels.0.label", fmt.Sprintf("%s", "label1")),
resource.TestCheckResourceAttr("data.grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "static_labels.0.value", fmt.Sprintf("%s", testAWSCloudWatchScrapeJobData.StaticLabels["label1"])),
resource.TestCheckResourceAttr("data.grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "static_labels.1.label", fmt.Sprintf("%s", "label2")),
resource.TestCheckResourceAttr("data.grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "static_labels.1.value", fmt.Sprintf("%s", testAWSCloudWatchScrapeJobData.StaticLabels["label2"])),
resource.TestCheckResourceAttr("data.grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "static_labels.0.label", "label1"),
resource.TestCheckResourceAttr("data.grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "static_labels.0.value", testAWSCloudWatchScrapeJobData.StaticLabels["label1"]),
resource.TestCheckResourceAttr("data.grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "static_labels.1.label", "label2"),
resource.TestCheckResourceAttr("data.grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "static_labels.1.value", testAWSCloudWatchScrapeJobData.StaticLabels["label2"]),
),
},
// update to remove regions_subset_override so that the account's regions are used instead
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ func TestAccResourceAWSCloudWatchScrapeJob(t *testing.T) {
resource.TestCheckResourceAttr("grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "custom_namespace.0.metric.0.statistics.#", fmt.Sprintf("%d", len(testAWSCloudWatchScrapeJobData.CustomNamespaces[0].Metrics[0].Statistics))),
resource.TestCheckResourceAttr("grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "custom_namespace.0.metric.0.statistics.0", testAWSCloudWatchScrapeJobData.CustomNamespaces[0].Metrics[0].Statistics[0]),
resource.TestCheckResourceAttr("grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "custom_namespace.0.scrape_interval_seconds", fmt.Sprintf("%d", testAWSCloudWatchScrapeJobData.CustomNamespaces[0].ScrapeIntervalSeconds)),
resource.TestCheckResourceAttr("grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "static_labels.0.label", fmt.Sprintf("%s", "label1")),
resource.TestCheckResourceAttr("grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "static_labels.0.value", fmt.Sprintf("%s", testAWSCloudWatchScrapeJobData.StaticLabels["label1"])),
resource.TestCheckResourceAttr("grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "static_labels.1.label", fmt.Sprintf("%s", "label2")),
resource.TestCheckResourceAttr("grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "static_labels.1.value", fmt.Sprintf("%s", testAWSCloudWatchScrapeJobData.StaticLabels["label2"])),
resource.TestCheckResourceAttr("grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "static_labels.0.label", "label1"),
resource.TestCheckResourceAttr("grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "static_labels.0.value", testAWSCloudWatchScrapeJobData.StaticLabels["label1"]),
resource.TestCheckResourceAttr("grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "static_labels.1.label", "label2"),
resource.TestCheckResourceAttr("grafana_cloud_provider_aws_cloudwatch_scrape_job.test", "static_labels.1.value", testAWSCloudWatchScrapeJobData.StaticLabels["label2"]),
),
},
// update to remove regions_subset_override so that the account's regions are used instead
Expand Down

0 comments on commit 625f1b0

Please sign in to comment.