Config UI: add missing config sections / partial yaml inputs (BC) (#13319)

This commit is contained in:
Michael Geers 2024-06-08 14:35:46 +02:00 • committed by GitHub
parent 62a1e223b6
commit 554ce1db60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
133 changed files with 4405 additions and 1572 deletions

View file

@ -5,6 +5,7 @@ import (
"testing"
"github.com/evcc-io/evcc/api"
"github.com/evcc-io/evcc/api/globalconfig"
"github.com/evcc-io/evcc/core"
"github.com/evcc-io/evcc/meter"
"github.com/evcc-io/evcc/server/db"
@ -35,7 +36,7 @@ func (suite *circuitsTestSuite) SetupTest() {
}
func (suite *circuitsTestSuite) TestCircuitConf() {
var conf globalConfig
var conf globalconfig.All
viper.SetConfigType("yaml")
suite.Require().NoError(viper.ReadConfig(strings.NewReader(`circuits:
@ -67,7 +68,7 @@ loadpoints:
}
func (suite *circuitsTestSuite) TestLoadpointMissingCircuitError() {
var conf globalConfig
var conf globalconfig.All
viper.SetConfigType("yaml")
suite.Require().NoError(viper.ReadConfig(strings.NewReader(`
@ -99,7 +100,7 @@ loadpoints:
}
func (suite *circuitsTestSuite) TestSiteMissingCircuitError() {
var conf globalConfig
var conf globalconfig.All
viper.SetConfigType("yaml")
suite.Require().NoError(viper.ReadConfig(strings.NewReader(`