Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type of monitor.filter.window: window is not an integer #10

Merged
merged 2 commits into from
Nov 22, 2018

Conversation

arosh
Copy link
Member

@arosh arosh commented Nov 19, 2018

This PR fixes the following bug.

$ goma register example.toml
Server error: 400 Bad Request
example: window is not an integer: 2 in filter

The content of example.toml is as follows.

[[monitor]]
name = "example"

  [monitor.probe]
  type = "exec"
  command = "true"

  [monitor.filter]
  type = "average"
  window = 2

  [[monitor.actions]]
  type = "exec"
  command = "true"

The TOML specification says that 64 bit range is expected.

See https://github.com/toml-lang/toml#integer


func TestLoadTOML(t *testing.T) {
tmpFileName, err := writeToTempFile(content)
defer os.Remove(tmpFileName)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

err チェックの後にやりましょう。

}

defer tmpFile.Close()
wtr := bufio.NewWriter(tmpFile)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bufio いらないでしょう。

_, err = io.WriteString(tmpFile, content)

Copy link
Member

@ymmt2005 ymmt2005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

指摘箇所の修正をお願いします。

@arosh
Copy link
Member Author

arosh commented Nov 19, 2018

修正しました。確認お願いいたします。

@ymmt2005
Copy link
Member

@arosh CI 動かしてほしいので、自分のレポジトリではなくこのレポジトリのブランチで作ってください。

@ymmt2005
Copy link
Member

@arosh ping

@arosh
Copy link
Member Author

arosh commented Nov 22, 2018

@ymmt2005
@Hsn723 がCircleCIの設定を修正してくれたのでCIが実行されるようになりました。

@ymmt2005
Copy link
Member

LGTM!

@ymmt2005 ymmt2005 merged commit 0b274fa into cybozu-go:master Nov 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants