ZhengLin-Li commented on code in PR #24811:
URL: https://github.com/apache/beam/pull/24811#discussion_r1059224041
##########
sdks/go/pkg/beam/transforms/sql/sql_test.go:
##########
@@ -0,0 +1,105 @@
+package sql
+
+import (
+ "github.com/apache/beam/sdks/v2/go/pkg/beam"
+ "github.com/apache/beam/sdks/v2/go/pkg/beam/transforms/sql/sqlx"
+ "reflect"
+ "runtime"
+ "testing"
+)
+
+func TestOptions_Add(t *testing.T) {
+ o := options{}
+ str := "this is a string"
+ bytes := []byte{1, 2, 3, 4}
+ testOpt := sqlx.Option{
+ Urn: str,
+ Payload: bytes,
+ }
+ tests := []struct {
+ opt sqlx.Option
+ }{
+ {
+ opt: testOpt,
Review Comment:
Thanks for reviewing my PR; I have changed my code.
The reason I originally used the tests slice is that it may support more
extensibility if we later add more test cases. But since just one test case can
successfully test the function, there is no need for more test cases, I think.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]