Skip to content

Commit ba8805e

Browse files
committed
integrationtest: Add integration test for gitlab_output.
1 parent a8a4162 commit ba8805e

File tree

5 files changed

+26
-0
lines changed

5 files changed

+26
-0
lines changed

integrationtest/command/command_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,11 @@ func TestStripDirectives(t *testing.T) {
147147
Update: *updateFlag,
148148
}.Run(t)
149149
}
150+
151+
func TestGitLabOutput(t *testing.T) {
152+
TestCase{
153+
Dir: "gitlab_output",
154+
Command: yamlfmtWithArgs("-dry -output_format gitlab ."),
155+
Update: *updateFlag,
156+
}.Run(t)
157+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Test case "gitlab_output"
2+
3+
needs: "no-op"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Test case "gitlab_output"
2+
3+
4+
needs: "reformatting"

integrationtest/command/testdata/gitlab_output/stdout/stderr.txt

Whitespace-only changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[
2+
{
3+
"description": "Not formatted correctly, run yamlfmt to resolve.",
4+
"check_name": "yamlfmt",
5+
"fingerprint": "e9b14e45ca01a9a72fda9b8356a9ddbbaf7fe8c47116790a51cd699ae1679353",
6+
"severity": "major",
7+
"location": {
8+
"path": "needs_format.yaml"
9+
}
10+
}
11+
]

0 commit comments

Comments
 (0)