Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Add test coverage for esMajorVersion for oss and default value
Browse files Browse the repository at this point in the history
  • Loading branch information
Crazybus committed Jul 8, 2019
1 parent 5ccb191 commit 009d895
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions elasticsearch/tests/elasticsearch_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,3 +703,21 @@ def test_esMajorVersion_set_to_6_based_on_image_tag():

r = helm_template(config)
assert r['statefulset'][uname]['metadata']['annotations']['esMajorVersion'] == '6'

def test_esMajorVersion_always_wins():
config = '''
esMajorVersion: 7
imageTag: 6.0.0
'''

r = helm_template(config)
assert r['statefulset'][uname]['metadata']['annotations']['esMajorVersion'] == '7'

def test_esMajorVersion_parse_image_tag_for_oss_image():
config = '''
image: docker.elastic.co/elasticsearch/elasticsearch-oss
imageTag: 6.3.2
'''

r = helm_template(config)
assert r['statefulset'][uname]['metadata']['annotations']['esMajorVersion'] == '6'

0 comments on commit 009d895

Please sign in to comment.