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(docker-compose): support docker-compose.yml version 1 #6596

Merged
merged 5 commits into from Jun 27, 2020

Commits on Jun 26, 2020

  1. Copy the full SHA
    c5a6c23 View commit details
    Browse the repository at this point in the history
  2. test(docker-compose): correct confused tests

    * 'returns null for empty' now actually checks empty string
      (previously this branch was ignored in test coverage)
    
    * 'returns null for non-object YAML' - existing test renamed
      (previously named 'for empty' which isn't what it was checking)
    wolfgang42 committed Jun 26, 2020
    Copy the full SHA
    22f9ba8 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2020

  1. refactor(docker-compose): add check that YAML is object

    There is a test ('returns null for non-object YAML') for this behaviour,
    but it was relying on the loop iterating over individual characters in
    the resulting string and not finding anything useful in them,
    which seems more like an accident than the way things were intentionally
    structured. So, this adds an explicit check for this case.
    wolfgang42 committed Jun 27, 2020
    Copy the full SHA
    e2a58f6 View commit details
    Browse the repository at this point in the history
  2. refactor(docker-compose): remove seemingly unnecessary if statement

    This was previously necessary to get the test 'returns null for
    non-object YAML' to pass, but that seems to have been accidental and was
    fixed in the previous commit.
    
    This does change the behaviour of this function, but not (I think) in a way
    which will cause issues: it will now return an empty array rather than null
    in the case of a compose file that has no services with an image, but doing
    so makes sense: the file was extracted successfully, it's just that there's
    nothing of interest to be found in it.
    wolfgang42 committed Jun 27, 2020
    Copy the full SHA
    07e00f3 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    a160423 View commit details
    Browse the repository at this point in the history