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: fix OpenMetrics tests #505

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions processor/formatters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -738,19 +738,19 @@ func TestToOpenMetricsMultiple(t *testing.T) {
res := toOpenMetrics(inputChan)
Debug = false

var expectedResult = `# TYPE scc_files count
var expectedResult = `# TYPE scc_files gauge
# HELP scc_files Number of sourcecode files.
# TYPE scc_lines count
# TYPE scc_lines gauge
# HELP scc_lines Number of lines.
# TYPE scc_code count
# TYPE scc_code gauge
# HELP scc_code Number of lines of actual code.
# TYPE scc_comments count
# TYPE scc_comments gauge
# HELP scc_comments Number of comments.
# TYPE scc_blanks count
# TYPE scc_blanks gauge
# HELP scc_blanks Number of blank lines.
# TYPE scc_complexity count
# TYPE scc_complexity gauge
# HELP scc_complexity Code complexity.
# TYPE scc_bytes count
# TYPE scc_bytes gauge
# UNIT scc_bytes bytes
# HELP scc_bytes Size in bytes.
scc_files{language="Go"} 2
Expand Down Expand Up @@ -971,19 +971,19 @@ func TestFileSummarizeOpenMetrics(t *testing.T) {
More = false
res := fileSummarize(inputChan)

var expectedResult = `# TYPE scc_files count
var expectedResult = `# TYPE scc_files gauge
# HELP scc_files Number of sourcecode files.
# TYPE scc_lines count
# TYPE scc_lines gauge
# HELP scc_lines Number of lines.
# TYPE scc_code count
# TYPE scc_code gauge
# HELP scc_code Number of lines of actual code.
# TYPE scc_comments count
# TYPE scc_comments gauge
# HELP scc_comments Number of comments.
# TYPE scc_blanks count
# TYPE scc_blanks gauge
# HELP scc_blanks Number of blank lines.
# TYPE scc_complexity count
# TYPE scc_complexity gauge
# HELP scc_complexity Code complexity.
# TYPE scc_bytes count
# TYPE scc_bytes gauge
# UNIT scc_bytes bytes
# HELP scc_bytes Size in bytes.
scc_files{language="Go"} 1
Expand Down Expand Up @@ -1023,19 +1023,19 @@ func TestFileSummarizeOpenMetricsPerFile(t *testing.T) {
Files = true
res := fileSummarize(inputChan)

var expectedResult = `# TYPE scc_files count
var expectedResult = `# TYPE scc_files gauge
# HELP scc_files Number of sourcecode files.
# TYPE scc_lines count
# TYPE scc_lines gauge
# HELP scc_lines Number of lines.
# TYPE scc_code count
# TYPE scc_code gauge
# HELP scc_code Number of lines of actual code.
# TYPE scc_comments count
# TYPE scc_comments gauge
# HELP scc_comments Number of comments.
# TYPE scc_blanks count
# TYPE scc_blanks gauge
# HELP scc_blanks Number of blank lines.
# TYPE scc_complexity count
# TYPE scc_complexity gauge
# HELP scc_complexity Code complexity.
# TYPE scc_bytes count
# TYPE scc_bytes gauge
# UNIT scc_bytes bytes
# HELP scc_bytes Size in bytes.
scc_lines{language="Go",file="C:\\bbbb.go"} 1000
Expand Down
Loading