Merge branch 'master' into feature/pubsub_20221214

This commit is contained in:
Alessandro (Ale) Segala 2022-12-19 14:05:43 -08:00 committed by GitHub
commit bb42483ff0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 16 deletions

View File

@ -143,23 +143,27 @@ func ConformanceTests(t *testing.T, props map[string]string, inputBinding bindin
}) })
t.Run("ping", func(t *testing.T) { t.Run("ping", func(t *testing.T) {
errInp := bindings.PingInpBinding(inputBinding) if config.HasOperation("read") {
// TODO: Ideally, all stable components should implenment ping function, errInp := bindings.PingInpBinding(inputBinding)
// so will only assert assert.Nil(t, err) finally, i.e. when current implementation // TODO: Ideally, all stable components should implenment ping function,
// implements ping in existing stable components // so will only assert assert.Nil(t, err) finally, i.e. when current implementation
if errInp != nil { // implements ping in existing stable components
assert.EqualError(t, errInp, "ping is not implemented by this input binding") if errInp != nil {
} else { assert.EqualError(t, errInp, "ping is not implemented by this input binding")
assert.Nil(t, errInp) } else {
assert.Nil(t, errInp)
}
} }
errOut := bindings.PingOutBinding(outputBinding) if config.HasOperation("operations") {
// TODO: Ideally, all stable components should implenment ping function, errOut := bindings.PingOutBinding(outputBinding)
// so will only assert assert.Nil(t, err) finally, i.e. when current implementation // TODO: Ideally, all stable components should implenment ping function,
// implements ping in existing stable components // so will only assert assert.Nil(t, err) finally, i.e. when current implementation
if errOut != nil { // implements ping in existing stable components
assert.EqualError(t, errOut, "ping is not implemented by this output binding") if errOut != nil {
} else { assert.EqualError(t, errOut, "ping is not implemented by this output binding")
assert.Nil(t, errOut) } else {
assert.Nil(t, errOut)
}
} }
}) })