Skip to content

Commit

Permalink
fix(test): Fix tests and upgrade SDK (#11160)
Browse files Browse the repository at this point in the history
  • Loading branch information
disq committed Jun 1, 2023
1 parent dbe7e92 commit cf10659
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
6 changes: 4 additions & 2 deletions plugins/source/test/docs/tables/test_testdata_table.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ The primary key for this table is **_cq_id**.
|uint64|`uint64`|
|uint8|`uint8`|
|uuid|`uuid`|
|decimal|`decimal(19, 10)`|
|json|`json`|
|json_array|`json`|
|boolean_list|`list<item: bool, nullable>`|
Expand Down Expand Up @@ -88,5 +89,6 @@ The primary key for this table is **_cq_id**.
|uint64_list|`list<item: uint64, nullable>`|
|uint8_list|`list<item: uint8, nullable>`|
|uuid_list|`list<item: uuid, nullable>`|
|struct|`struct<binary: binary, boolean: bool, date32: date32, date64: date64, daytimeinterval: day_time_interval, duration_ms: duration[ms], duration_ns: duration[ns], duration_s: duration[s], duration_us: duration[us], float32: float32, float64: float64, inet: inet, int16: int16, int32: int32, int64: int64, int8: int8, largebinary: large_binary, largestring: large_utf8, mac: mac, monthdaynanointerval: month_day_nano_interval, monthinterval: month_interval, string: utf8, time32ms: time32[ms], time32s: time32[s], time64ns: time64[ns], time64us: time64[us], timestamp_ms: timestamp[ms, tz=UTC], timestamp_ns: timestamp[ns, tz=UTC], timestamp_s: timestamp[s, tz=UTC], timestamp_us: timestamp[us, tz=UTC], uint16: uint16, uint32: uint32, uint64: uint64, uint8: uint8, uuid: uuid, json: json, json_array: json>`|
|nested_struct|`struct<inner: struct<binary: binary, boolean: bool, date32: date32, date64: date64, daytimeinterval: day_time_interval, duration_ms: duration[ms], duration_ns: duration[ns], duration_s: duration[s], duration_us: duration[us], float32: float32, float64: float64, inet: inet, int16: int16, int32: int32, int64: int64, int8: int8, largebinary: large_binary, largestring: large_utf8, mac: mac, monthdaynanointerval: month_day_nano_interval, monthinterval: month_interval, string: utf8, time32ms: time32[ms], time32s: time32[s], time64ns: time64[ns], time64us: time64[us], timestamp_ms: timestamp[ms, tz=UTC], timestamp_ns: timestamp[ns, tz=UTC], timestamp_s: timestamp[s, tz=UTC], timestamp_us: timestamp[us, tz=UTC], uint16: uint16, uint32: uint32, uint64: uint64, uint8: uint8, uuid: uuid, json: json, json_array: json>>`|
|decimal_list|`list<item: decimal(19, 10), nullable>`|
|struct|`struct<binary: binary, boolean: bool, date32: date32, date64: date64, daytimeinterval: day_time_interval, duration_ms: duration[ms], duration_ns: duration[ns], duration_s: duration[s], duration_us: duration[us], float32: float32, float64: float64, inet: inet, int16: int16, int32: int32, int64: int64, int8: int8, largebinary: large_binary, largestring: large_utf8, mac: mac, monthdaynanointerval: month_day_nano_interval, monthinterval: month_interval, string: utf8, time32ms: time32[ms], time32s: time32[s], time64ns: time64[ns], time64us: time64[us], timestamp_ms: timestamp[ms, tz=UTC], timestamp_ns: timestamp[ns, tz=UTC], timestamp_s: timestamp[s, tz=UTC], timestamp_us: timestamp[us, tz=UTC], uint16: uint16, uint32: uint32, uint64: uint64, uint8: uint8, uuid: uuid, decimal: decimal(19, 10), json: json, json_array: json>`|
|nested_struct|`struct<inner: struct<binary: binary, boolean: bool, date32: date32, date64: date64, daytimeinterval: day_time_interval, duration_ms: duration[ms], duration_ns: duration[ns], duration_s: duration[s], duration_us: duration[us], float32: float32, float64: float64, inet: inet, int16: int16, int32: int32, int64: int64, int8: int8, largebinary: large_binary, largestring: large_utf8, mac: mac, monthdaynanointerval: month_day_nano_interval, monthinterval: month_interval, string: utf8, time32ms: time32[ms], time32s: time32[s], time64ns: time64[ns], time64us: time64[us], timestamp_ms: timestamp[ms, tz=UTC], timestamp_ns: timestamp[ns, tz=UTC], timestamp_s: timestamp[s, tz=UTC], timestamp_us: timestamp[us, tz=UTC], uint16: uint16, uint32: uint32, uint64: uint64, uint8: uint8, uuid: uuid, decimal: decimal(19, 10), json: json, json_array: json>>`|
8 changes: 4 additions & 4 deletions plugins/source/test/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ module github.com/cloudquery/cloudquery/plugins/source/test
go 1.19

require (
github.com/apache/arrow/go/v13 v13.0.0-20230601070034-e07e22c5580a
github.com/apache/arrow/go/v13 v13.0.0-20230531201200-cbc17a98dfd9
github.com/cloudquery/plugin-pb-go v1.0.8
github.com/cloudquery/plugin-sdk/v3 v3.6.7
github.com/cloudquery/plugin-sdk/v3 v3.9.0
github.com/rs/zerolog v1.29.0
)

replace github.com/apache/arrow/go/v13 => github.com/cloudquery/arrow/go/v13 v13.0.0-20230525142029-2d32efeedad8
replace github.com/apache/arrow/go/v13 => github.com/cloudquery/arrow/go/v13 v13.0.0-20230531175333-b1f2ea85de82

require (
github.com/andybalholm/brotli v1.0.5 // indirect
Expand Down Expand Up @@ -49,7 +49,7 @@ require (
golang.org/x/text v0.9.0 // indirect
golang.org/x/tools v0.6.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect
google.golang.org/grpc v1.55.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
12 changes: 6 additions & 6 deletions plugins/source/test/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cloudquery/arrow/go/v13 v13.0.0-20230525142029-2d32efeedad8 h1:/mgK+To5HNUzuZDWdVygbfn8oaPG5c7I/8qCxwwpWO8=
github.com/cloudquery/arrow/go/v13 v13.0.0-20230525142029-2d32efeedad8/go.mod h1:/XatdE3kDIBqZKhZ7OBUHwP2jaASDFZHqF4puOWM8po=
github.com/cloudquery/arrow/go/v13 v13.0.0-20230531175333-b1f2ea85de82 h1:O9J0ZePUv8xGAeD+WqXg1XoWKPxKUY1sZ6S9HykiAcA=
github.com/cloudquery/arrow/go/v13 v13.0.0-20230531175333-b1f2ea85de82/go.mod h1:/XatdE3kDIBqZKhZ7OBUHwP2jaASDFZHqF4puOWM8po=
github.com/cloudquery/plugin-pb-go v1.0.8 h1:wn3GXhcNItcP+6wUUZuzUFbvdL59liKBO37/izMi+FQ=
github.com/cloudquery/plugin-pb-go v1.0.8/go.mod h1:vAGA27psem7ZZNAY4a3S9TKuA/JDQWstjKcHPJX91Mc=
github.com/cloudquery/plugin-sdk/v2 v2.7.0 h1:hRXsdEiaOxJtsn/wZMFQC9/jPfU1MeMK3KF+gPGqm7U=
github.com/cloudquery/plugin-sdk/v2 v2.7.0/go.mod h1:pAX6ojIW99b/Vg4CkhnsGkRIzNaVEceYMR+Bdit73ug=
github.com/cloudquery/plugin-sdk/v3 v3.6.7 h1:QJqZGHs+3uN+CE3y9oBOjkchH/v5XisRnVP2X4aj9Wo=
github.com/cloudquery/plugin-sdk/v3 v3.6.7/go.mod h1:+ta6OETfGfzh6nCpCyZi5Er1rj+zvn7m2QR2wokEvA8=
github.com/cloudquery/plugin-sdk/v3 v3.9.0 h1:HseC7ivv48leWYDMZ2/djDWb06Qqn8K6KjNuRtYvFqo=
github.com/cloudquery/plugin-sdk/v3 v3.9.0/go.mod h1:8PHS8cMjWPeXrurnI30dyHwViK4HJUZLA6uys+F2fXQ=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
Expand Down Expand Up @@ -453,8 +453,8 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e h1:NumxXLPfHSndr3wBBdeKiVHjGVFzi9RX2HwwQke94iY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
Expand Down
4 changes: 3 additions & 1 deletion plugins/source/test/resources/services/testdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import (
)

func TestDataTable() *schema.Table {
table := schema.TestTable("test_testdata_table", schema.TestSourceOptions{})
table := schema.TestTable("test_testdata_table", schema.TestSourceOptions{
SkipMaps: true,
})
for i, c := range table.Columns {
if strings.HasPrefix(c.Name, "_cq_") {
table.Columns[i].Name = "test" + c.Name
Expand Down

0 comments on commit cf10659

Please sign in to comment.