From d1f83aa115679b3e35367de3510ba86c462fc227 Mon Sep 17 00:00:00 2001 From: chris-sun-star Date: Tue, 1 Nov 2022 15:27:19 +0800 Subject: [PATCH] fix test --- go.mod | 1 + plugins/inputs/mysql/table_input_test.go | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0600242..a2d2751 100644 --- a/go.mod +++ b/go.mod @@ -13,6 +13,7 @@ require ( github.com/go-sql-driver/mysql v1.6.0 github.com/golang/protobuf v1.5.2 // indirect github.com/gwatts/gin-adapter v0.0.0-20170508204228-c44433c485ad + github.com/hashicorp/golang-lru v0.5.3 // indirect github.com/huandu/go-clone v1.3.0 github.com/kr/text v0.2.0 // indirect github.com/mattn/go-isatty v0.0.12 diff --git a/plugins/inputs/mysql/table_input_test.go b/plugins/inputs/mysql/table_input_test.go index 150c502..1226e79 100644 --- a/plugins/inputs/mysql/table_input_test.go +++ b/plugins/inputs/mysql/table_input_test.go @@ -130,7 +130,7 @@ func TestCollectConditionNotSatisfied(t *testing.T) { k1: 1 collectConfig: - sql: select t1, t2, m1, m2 from test_metric - condition: k0 + conditions: [k0] name: test tags: tag1: t1 @@ -161,7 +161,7 @@ func TestCollectConditionNotFound(t *testing.T) { k1: 1 collectConfig: - sql: select t1, t2, m1, m2 from test_metric - condition: k2 + conditions: [k2] name: test tags: tag1: t1 @@ -193,7 +193,7 @@ func TestCollectConditionNotBool(t *testing.T) { k2: x collectConfig: - sql: select t1, t2, m1, m2 from test_metric - condition: k2 + conditions: [k2] name: test tags: tag1: t1 -- GitLab