logstash/docker/tests/test_labels.py
João Duarte dc5db673ee
build docker images from logstash repo (#10603)
introduces two rake tasks: `rake artifact:docker_oss` and `rake artifact:docker`, which will create the docker images of the OSS and non OSS packages. These tasks depend on the tar artifacts being built.

Also `rake artifact:all` has been modified to also call these two tasks.

most code was moved from https://github.com/elastic/logstash-docker/
2019-04-04 11:27:06 +01:00

15 lines
684 B
Python

from .fixtures import logstash
def test_labels(logstash):
labels = logstash.docker_metadata['Config']['Labels']
assert labels['org.label-schema.name'] == 'logstash'
assert labels['org.label-schema.schema-version'] == '1.0'
assert labels['org.label-schema.url'] == 'https://www.elastic.co/products/logstash'
assert labels['org.label-schema.vcs-url'] == 'https://github.com/elastic/logstash'
assert labels['org.label-schema.vendor'] == 'Elastic'
assert labels['org.label-schema.version'] == logstash.tag
if logstash.image_flavor == 'oss':
assert labels['license'] == 'Apache-2.0'
else:
assert labels['license'] == 'Elastic License'