Skip to content

Commit

Permalink
Fix message labels on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatas committed May 18, 2021
1 parent e73ed76 commit c7b7419
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 26 deletions.
16 changes: 5 additions & 11 deletions cmd/tsbs_generate_queries/databases/clickhouse/devops_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,7 @@ func TestMaxAllCPU(t *testing.T) {
desc: "negative hosts",
input: -1,
fail: true,
failMsg: "number of hosts cannot be < 1; got -1",
},
{
desc: "zero hosts",
input: 0,
fail: true,
failMsg: "number of hosts cannot be < 1; got 0",
failMsg: "number of hosts cannot be < 0; got -1",
},
{
desc: "1 host",
Expand Down Expand Up @@ -200,7 +194,7 @@ func TestGroupByTimeAndPrimaryTag(t *testing.T) {
hour,
id
) AS cpu_avg
ORDER BY
hour ASC,
hostname
Expand Down Expand Up @@ -228,7 +222,7 @@ func TestGroupByTimeAndPrimaryTag(t *testing.T) {
hour,
id
) AS cpu_avg
ORDER BY
hour ASC,
hostname
Expand Down Expand Up @@ -320,7 +314,7 @@ func TestHighCPUForHosts(t *testing.T) {
desc: "negative hosts",
input: -1,
fail: true,
failMsg: "number of hosts cannot be < 1; got -1",
failMsg: "number of hosts cannot be < 0; got -1",
},
{
desc: "zero hosts",
Expand All @@ -330,7 +324,7 @@ func TestHighCPUForHosts(t *testing.T) {
expectedQuery: `
SELECT *
FROM cpu
PREWHERE (usage_user > 90.0) AND (created_at >= '1970-01-01 00:16:22') AND (created_at < '1970-01-01 12:16:22')
PREWHERE (usage_user > 90.0) AND (created_at >= '1970-01-01 00:16:22') AND (created_at < '1970-01-01 12:16:22')
`,
},
{
Expand Down
8 changes: 1 addition & 7 deletions cmd/tsbs_generate_queries/databases/influx/devops_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,6 @@ func TestDevopsGroupByTimeAndPrimaryTag(t *testing.T) {

func TestMaxAllCPU(t *testing.T) {
cases := []testCase{
{
desc: "zero hosts",
input: 0,
fail: true,
failMsg: "number of hosts cannot be < 1; got 0",
},
{
desc: "1 host",
input: 1,
Expand Down Expand Up @@ -310,7 +304,7 @@ func TestHighCPUForHosts(t *testing.T) {
desc: "negative hosts",
input: -1,
fail: true,
failMsg: "number of hosts cannot be < 1; got -1",
failMsg: "number of hosts cannot be < 0; got -1",
},
{
desc: "zero hosts",
Expand Down
10 changes: 2 additions & 8 deletions cmd/tsbs_generate_queries/databases/siridb/devops_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,7 @@ func TestMaxAllCPU(t *testing.T) {
desc: "negative hosts",
input: -1,
fail: true,
failMsg: "number of hosts cannot be < 1; got -1",
},
{
desc: "zero hosts",
input: 0,
fail: true,
failMsg: "number of hosts cannot be < 1; got 0",
failMsg: "number of hosts cannot be < 0; got -1",
},
{
desc: "1 host",
Expand Down Expand Up @@ -274,7 +268,7 @@ func TestHighCPUForHosts(t *testing.T) {
desc: "negative hosts",
input: -1,
fail: true,
failMsg: "number of hosts cannot be < 1; got -1",
failMsg: "number of hosts cannot be < 0; got -1",
},
{
desc: "zero hosts",
Expand Down

0 comments on commit c7b7419

Please sign in to comment.