begin implementing separate metadata parsing

This commit is contained in:
Daniel Fichtinger 2024-12-31 22:47:01 -05:00
parent 709a2738f9
commit 35c14f09c0
6 changed files with 192 additions and 2 deletions

View file

@ -0,0 +1,37 @@
package builder
import "testing"
func Test_processWithYaml(t *testing.T) {
tests := []struct {
name string // description of this test case
// Named input parameters for target function.
f []byte
want Metadata
want2 []byte
wantErr bool
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, got2, gotErr := processWithYaml(tt.f)
if gotErr != nil {
if !tt.wantErr {
t.Errorf("processWithYaml() failed: %v", gotErr)
}
return
}
if tt.wantErr {
t.Fatal("processWithYaml() succeeded unexpectedly")
}
// TODO: update the condition below to compare got with tt.want.
if true {
t.Errorf("processWithYaml() = %v, want %v", got, tt.want)
}
if true {
t.Errorf("processWithYaml() = %v, want %v", got2, tt.want2)
}
})
}
}