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

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
usamaahmadkhan committed Oct 29, 2019
1 parent 4eea54c commit a9ca086
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions elasticsearch/tests/elasticsearch_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,43 @@ def test_adding_a_nodePort():

assert r['service'][uname]['spec']['ports'][0]['nodePort'] == 30001


def test_adding_a_label_on_non_headless_service():
config = ''

r = helm_template(config)

assert 'label1' not in r['service'][uname]['metadata']['labels']

config = '''
service:
labels:
label1: value1
'''

r = helm_template(config)

assert r['service'][uname]['metadata']['labels']['label1'] == 'value1'



def test_adding_a_label_on_headless_service():
config = ''

r = helm_template(config)

assert 'label1' not in r['service'][uname + '-headless']['metadata']['labels']

config = '''
service:
labelsHeadless:
label1: value1
'''

r = helm_template(config)

assert r['service'][uname + '-headless']['metadata']['labels']['label1'] == 'value1'

def test_master_termination_fixed_enabled():
config = ''

Expand Down

0 comments on commit a9ca086

Please sign in to comment.