Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ostcar committed Feb 14, 2024
1 parent 015054c commit c86db35
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/datastore/dsmock/yaml_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ func YAMLData(input string) map[dskey.Key][]byte {
parts := strings.Split(dbKey, "/")
switch len(parts) {
case 1:
map1, ok := dbValue.(map[interface{}]interface{})
map1, ok := dbValue.(map[string]interface{})
if !ok {
panic(fmt.Errorf("invalid type in db key %s: %T", dbKey, dbValue))
}
for rawID, rawObject := range map1 {
id, ok := rawID.(int)
if !ok {
id, err := strconv.Atoi(rawID)
if err != nil {
panic(fmt.Errorf("invalid id type: got %T expected int", rawID))
}
field, ok := rawObject.(map[string]interface{})
Expand Down

0 comments on commit c86db35

Please sign in to comment.