Skip to content

Commit

Permalink
Merge pull request #416 from CircleCI-Public/test-config-process
Browse files Browse the repository at this point in the history
Write test for config validate
  • Loading branch information
marcomorain authored May 23, 2020
2 parents 10e7a9c + bd76fc8 commit 2de5b3f
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion integration_tests/features/circleci_config.feature
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,23 @@ Feature: Config checking
When I run `circleci config process --skip-update-check config.yml`
Then the output should contain "A job must have one of `docker`, `machine`, `macos` or `executor`"

Scenario: Scenario: Processing a config that has special characters
Scenario: Processing a config that has special characters
Given I use a fixture named "config_files"
When I run `circleci config process --skip-update-check with_percent.yml`
Then the exit status should be 0
And the output should contain "command: date '+%Y-%m-%dT%T%z'"

Scenario: Running validate in a directory that is not a git repo
When I cd to "/tmp"
And I write to "config.yml" with:
"""
jobs:
build:
machine: true
steps: [checkout]
"""
Then I run `git status`
And the output should contain "fatal: not a git repository (or any of the parent directories): .git"
And I run `circleci config validate --skip-update-check -c config.yml`
And the output should contain "Config file at config.yml is valid."
And the exit status should be 0

0 comments on commit 2de5b3f

Please sign in to comment.