This top level function is a test helper, so I've moved it into the
config_test file and updated accordingly.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
When building test data using make_service_dict, we need to include
working_dir as it is core to some of the functionality of
ServiceLoader.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
If you have an alternate YAML file with different services defined,
containers for those services will be shown in `docker-compose ps` even
if you don't pass that file in.
Furthermore, `docker-compose rm` will claim that it's going to remove
them, but actually won't.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
When specifying the 'file' key to a value of it's own name, test
that this works and does not cause a false positive circular reference
error.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
In our circular reference check the stack was previously off by one,
by not including the current service name that was calling another.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
A circular reference bug occurs when there is a difference in the paths
of the file specified in the extends. So one time it is relative, second
time is absolute thus allowing a further circular reference to occur.
By using absolute paths we can be sure that the service filename check
is correct.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
This refactoring allows us to raise an error when there is no
'file' key specified in the .yml and no self.filename set. This
error was specific to the tests, as the tests are
the only place that constructs service dicts without sometimes
setting a filename.
Moving the function within the class as well as it is code that
is exclusively for the use of validating properties for the
ServiceLoader class.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
Split them out into individual validation tests so it is clearer
to see what is going on and to enable adding further validation
tests.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
If we're using self.filename, then it's already a full path and we
don't need to splice off the filename.yml just so we can .join it
back together again.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
If the 'file' key is not set in the extends_options dict then we
look for the 'service' from within the same file.
Fixes this issue: https://github.com/docker/compose/issues/1237
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
The process function contained purely validation checks, so re-named
the function to aid intent clarity.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
This commit adds environment variable parsing to the container side
of the volume mapping in configs. The common use case for this is
mounting SSH agent sockets in a container, using code like:
volumes:
- $SSH_AUTH_SOCK:$SSH_AUTH_SOCK
environment:
- SSH_AUTH_SOCK
Signed-off-by: Jeff Kramer <jeff.kramer@voxmedia.com>
As VALID_CHARS is shared with project names, these chars are also
now allowed within project names.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
These tests were indeed raising a config error, but not for the reason
intended/tested for. I've added in the image name so the config error
raise is correctly testing the Service name.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
boot2docker is the more common case so let's have that one first.
Also be more explicit and clear that the localhost:5000 is applicable
for people running on linux.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
To aid clarity in how to contribute, I've moved the release process
out into it's own RELEASE_PROCESS.md file. The release process info
is only relevant for maintainers who are building new releases of
compose.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
Added a link to boot2docker for those unfamiliar with it.
http://0.0.0.0:5000 didn't resolve for me, however localhost:5000
did, so included reference to that.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
When reading through the code for the first time and seeing redis,
those unfamiliar with docker first thought might be that they need
to install redis. Adding this sentence helps make it clearer that
this is not needed. Docker will take care of this in services.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
When running `docker-compose up`, an extra line of output, from flask,
is outputted. I've included it so anyone new to docker-compose who
sees this output will know that it's expected and not worry that
something might have gone wrong.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>