Skip to content

Commit

Permalink
fix acceptance test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexott committed Nov 18, 2024
1 parent 35043de commit 8f51df9
Showing 1 changed file with 9 additions and 24 deletions.
33 changes: 9 additions & 24 deletions internal/acceptance/quality_monitor_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package acceptance

import (
"fmt"
"os"
"testing"
)
Expand Down Expand Up @@ -65,7 +66,7 @@ func TestUcAccQualityMonitor(t *testing.T) {
problem_type = "PROBLEM_TYPE_REGRESSION"
}
schedule {
quartz_cron_expression = "0 0 12 * * ?",
quartz_cron_expression = "0 0 12 * * ?"
timezone_id = "PST"
}
}
Expand All @@ -92,7 +93,7 @@ func TestUcAccQualityMonitor(t *testing.T) {
timestamp_col = "timestamp"
}
schedule {
quartz_cron_expression = "0 0 12 * * ?",
quartz_cron_expression = "0 0 12 * * ?"
timezone_id = "PST"
}
}
Expand Down Expand Up @@ -125,8 +126,7 @@ func TestUcAccUpdateQualityMonitor(t *testing.T) {
if os.Getenv("GOOGLE_CREDENTIALS") != "" {
t.Skipf("databricks_quality_monitor resource is not available on GCP")
}
UnityWorkspaceLevel(t, Step{
Template: commonPartQualityMonitoring + `
qmTemplate := `
resource "databricks_quality_monitor" "testMonitorInference" {
table_name = databricks_sql_table.myInferenceTable.id
assets_dir = "/Shared/provider-test/databricks_quality_monitoring/${databricks_sql_table.myInferenceTable.name}"
Expand All @@ -139,29 +139,14 @@ func TestUcAccUpdateQualityMonitor(t *testing.T) {
problem_type = "PROBLEM_TYPE_REGRESSION"
}
schedule {
quartz_cron_expression = "0 0 12 * * ?",
quartz_cron_expression = "0 0 %s * * ?"
timezone_id = "PST"
}
}
`,
`
UnityWorkspaceLevel(t, Step{
Template: commonPartQualityMonitoring + fmt.Sprintf(qmTemplate, "12"),
}, Step{
Template: commonPartQualityMonitoring + `
resource "databricks_quality_monitor" "testMonitorInference" {
table_name = databricks_sql_table.myInferenceTable.id
assets_dir = "/Shared/provider-test/databricks_quality_monitoring/${databricks_sql_table.myInferenceTable.name}"
output_schema_name = databricks_schema.things.id
inference_log {
granularities = ["1 hour"]
timestamp_col = "timestamp"
prediction_col = "prediction"
model_id_col = "model_id"
problem_type = "PROBLEM_TYPE_REGRESSION"
}
schedule {
quartz_cron_expression = "0 0 11 * * ?",
timezone_id = "PST"
}
}
`,
Template: commonPartQualityMonitoring + fmt.Sprintf(qmTemplate, "11"),
})
}

0 comments on commit 8f51df9

Please sign in to comment.