Add raw SPC convective outlook source
This commit is contained in:
@@ -87,6 +87,7 @@ func TestRegisterBuiltinsRegistersAllCurrentDrivers(t *testing.T) {
|
||||
"openmeteo_observation",
|
||||
"openmeteo_forecast",
|
||||
"openweather_observation",
|
||||
"spc_convective_outlook",
|
||||
}
|
||||
|
||||
for _, driver := range drivers {
|
||||
@@ -105,13 +106,18 @@ func sourceConfigForDriver(driver string) config.SourceConfig {
|
||||
if driver == "openweather_observation" {
|
||||
url = "https://example.invalid?units=metric"
|
||||
}
|
||||
params := map[string]any{
|
||||
"url": url,
|
||||
"user_agent": "test-agent",
|
||||
}
|
||||
if driver == "spc_convective_outlook" {
|
||||
params["latitude"] = 38.6239
|
||||
params["longitude"] = -90.3571
|
||||
}
|
||||
return config.SourceConfig{
|
||||
Name: "test-source",
|
||||
Driver: driver,
|
||||
Mode: config.SourceModePoll,
|
||||
Params: map[string]any{
|
||||
"url": url,
|
||||
"user_agent": "test-agent",
|
||||
},
|
||||
Params: params,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user