add e2e tests for v1 config (#3608)

This commit is contained in:
fatedier
2023-09-13 16:32:39 +08:00
committed by GitHub
parent c95311d1a0
commit 7cd02f5bd8
61 changed files with 3697 additions and 159 deletions

View File

@@ -46,10 +46,11 @@ func (c *TypedClientPluginOptions) UnmarshalJSON(b []byte) error {
if !ok {
return fmt.Errorf("unknown plugin type: %s", typeStruct.Type)
}
if err := json.Unmarshal(b, v); err != nil {
options := reflect.New(v).Interface().(ClientPluginOptions)
if err := json.Unmarshal(b, options); err != nil {
return err
}
c.ClientPluginOptions = v
c.ClientPluginOptions = options
return nil
}