Skip to content

Commit

Permalink
Bumped last line of coverage
Browse files Browse the repository at this point in the history
Signed-off-by: quobix <dave@quobix.com>
  • Loading branch information
daveshanley committed Jan 4, 2024
1 parent 961fe76 commit d7c6474
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions datamodel/low/base/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1861,3 +1861,30 @@ components:
assert.Nil(t, res)
assert.Equal(t, "schema build failed: reference '[empty]' cannot be found at line 1, col 7", e.Error())
}

func TestBuildSchema_BadNodeTypes(t *testing.T) {

n := &yaml.Node{
Tag: "!!burgers",
Line: 1,
Column: 2,
}

eChan := make(chan error, 1)
doneChan := make(chan bool, 1)
bChan := make(chan schemaProxyBuildResult, 1)
var err error
go func() {
for {
select {
case e := <-eChan:
err = e
doneChan <- true
}
}
}()

buildSchema(context.Background(), bChan, n, n, eChan, nil)
<-doneChan
assert.Equal(t, "build schema failed: unexpected data type: 'unknown', line 1, col 2", err.Error())
}

0 comments on commit d7c6474

Please sign in to comment.