-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support for comments, for compose file 3.0, and for yaml 2.1
- Loading branch information
Showing
7 changed files
with
211 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Feature: Format | ||
As a DevOps | ||
I want to add comments | ||
so that I can mark specialities | ||
|
||
Scenario: Comment at End of Line | ||
Given a file named "compose.yml" with: | ||
""" | ||
foo: # TODO: This service still uses hard-coded configuration | ||
image: bar | ||
""" | ||
When I run `bin/compose_format compose.yml` | ||
Then it should pass with exactly: | ||
""" | ||
foo: # TODO: This service still uses hard-coded configuration | ||
image: bar | ||
""" | ||
|
||
|
||
Scenario: Single Line Comment | ||
Given a file named "compose.yml" with: | ||
""" | ||
foo: | ||
# Test | ||
image: bar | ||
""" | ||
When I run `bin/compose_format compose.yml` | ||
Then it should pass with exactly: | ||
""" | ||
foo: | ||
# Test | ||
image: bar | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
Feature: Stack | ||
As a DevOps | ||
I want to format docker stack files | ||
so that | ||
|
||
Scenario: Compose Version 3 | ||
Given a file named "compose.yml" with: | ||
""" | ||
version: "3" | ||
services: | ||
foo: | ||
image: bar | ||
""" | ||
When I run `bin/compose_format compose.yml` | ||
Then it should pass with exactly: | ||
""" | ||
version: '3' | ||
services: | ||
foo: | ||
image: bar | ||
""" | ||
|
||
Scenario: Healthcheck | ||
Given a file named "compose.yml" with: | ||
""" | ||
version: "3" | ||
services: | ||
foo: | ||
image: bar | ||
healthcheck: | ||
interval: 1m30s | ||
timeout: 10s | ||
retries: 3 | ||
test: ["CMD", "/bin/true"] | ||
""" | ||
When I run `bin/compose_format compose.yml` | ||
Then it should pass with exactly: | ||
""" | ||
version: '3' | ||
services: | ||
foo: | ||
image: bar | ||
healthcheck: | ||
test: [CMD, /bin/true] | ||
interval: 1m30s | ||
timeout: 10s | ||
retries: 3 | ||
""" | ||
|
||
Scenario: Deploy | ||
Given a file named "compose.yml" with: | ||
""" | ||
version: "3" | ||
services: | ||
foo: | ||
image: bar | ||
deploy: | ||
replicas: 7 | ||
mode: global | ||
""" | ||
When I run `bin/compose_format compose.yml` | ||
Then it should pass with exactly: | ||
""" | ||
version: '3' | ||
services: | ||
foo: | ||
image: bar | ||
deploy: | ||
replicas: 7 | ||
mode: global | ||
""" |
Oops, something went wrong.