yjp 7 mēneši atpakaļ
vecāks
revīzija
b918fe92ef
1 mainītis faili ar 4 papildinājumiem un 2 dzēšanām
  1. 4 2
      yaml/yaml_loader/yaml_loader_test.go

+ 4 - 2
yaml/yaml_loader/yaml_loader_test.go

@@ -76,8 +76,9 @@ func TestLoadYAML(t *testing.T) {
 func TestLoadYAMLMap(t *testing.T) {
 	retObjectMaps := make([]map[string]any, 0)
 
-	err := LoadYamlMapFile("test.yaml", func(objectMap map[string]any) {
+	err := LoadYamlMapFile("test.yaml", func(objectMap map[string]any) error {
 		retObjectMaps = append(retObjectMaps, objectMap)
+		return nil
 	})
 	if err != nil {
 		t.Fatal(err)
@@ -98,8 +99,9 @@ func TestLoadYAMLMap(t *testing.T) {
 		t.Fatal(err)
 	}
 
-	err = LoadYamlMapBytes(yamlFileBytes, func(objectMap map[string]any) {
+	err = LoadYamlMapBytes(yamlFileBytes, func(objectMap map[string]any) error {
 		retObjectMaps = append(retObjectMaps, objectMap)
+		return nil
 	})
 	if err != nil {
 		t.Fatal(err)