Skip to content

Commit

Permalink
Merge pull request #16 from mackerelio/fix-wrong
Browse files Browse the repository at this point in the history
fix wrong function name and expected values
  • Loading branch information
lufia authored Feb 22, 2024
2 parents 3ed5baf + f162e15 commit 07e62d9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/mysql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ func TestGraphDefinition_DisableInnoDB(t *testing.T) {

mysql.DisableInnoDB = true
graphdef := mysql.GraphDefinition()
if len(graphdef) != 8 {
t.Errorf("GetTempfilename: %d should be 7", len(graphdef))
if n := 8; len(graphdef) != n {
t.Errorf("GraphDefinition: %d should be %d", len(graphdef), n)
}
}

func TestGraphDefinition(t *testing.T) {
var mysql MySQLPlugin

graphdef := mysql.GraphDefinition()
if len(graphdef) != 29 {
t.Errorf("GetTempfilename: %d should be 28", len(graphdef))
if n := 29; len(graphdef) != n {
t.Errorf("GraphDefinition: %d should be %d", len(graphdef), n)
}
}

Expand All @@ -32,8 +32,8 @@ func TestGraphDefinition_DisableInnoDB_EnableExtended(t *testing.T) {
mysql.DisableInnoDB = true
mysql.EnableExtended = true
graphdef := mysql.GraphDefinition()
if len(graphdef) != 18 {
t.Errorf("GetTempfilename: %d should be 18", len(graphdef))
if n := 18; len(graphdef) != n {
t.Errorf("GraphDefinition: %d should be %d", len(graphdef), n)
}
}

Expand All @@ -42,8 +42,8 @@ func TestGraphDefinition_EnableExtended(t *testing.T) {

mysql.EnableExtended = true
graphdef := mysql.GraphDefinition()
if len(graphdef) != 39 {
t.Errorf("GetTempfilename: %d should be 39", len(graphdef))
if n := 39; len(graphdef) != n {
t.Errorf("GraphDefinition: %d should be %d", len(graphdef), n)
}
}

Expand Down

0 comments on commit 07e62d9

Please sign in to comment.