- Relocated testfixtures from the root to the internal package for better encapsulation. - Updated import paths in codec test files across env, ini, json, yaml directories to reflect the new location. - Removed the now obsolete testfixtures.go file.
21 lines
396 B
Go
21 lines
396 B
Go
package ini
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/eslider/go-config/internal/testfixtures"
|
|
)
|
|
|
|
func TestCodec_IdentityINIFixture(t *testing.T) {
|
|
c := New(WithBytes(testfixtures.Load(t, "identity", "service.ini")))
|
|
m, err := c.Map(context.Background())
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
svc := m["service"].(map[string]any)
|
|
if svc["name"] != "my-service" {
|
|
t.Fatalf("%#v", svc)
|
|
}
|
|
}
|