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

Commit

Permalink
[elasticsearch] fix format of test for loadBalancerSourceRanges
Browse files Browse the repository at this point in the history
  • Loading branch information
ta-ando committed Feb 25, 2020
1 parent 06e85e8 commit 87aa7b1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions elasticsearch/tests/elasticsearch_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,23 +763,24 @@ def test_adding_a_label_on_headless_service():


def test_adding_load_balancer_source_ranges():
config = '''
config = """
service:
loadBalancerSourceRanges:
- 0.0.0.0/0
'''
"""
r = helm_template(config)
assert r['service'][uname]['spec']['loadBalancerSourceRanges'][0] == "0.0.0.0/0"
assert r["service"][uname]["spec"]["loadBalancerSourceRanges"][0] == "0.0.0.0/0"

config = '''
config = """
service:
loadBalancerSourceRanges:
- 192.168.0.0/24
- 192.168.1.0/24
'''
"""
r = helm_template(config)
assert r['service'][uname]['spec']['loadBalancerSourceRanges'][0] == "192.168.0.0/24"
assert r['service'][uname]['spec']['loadBalancerSourceRanges'][1] == "192.168.1.0/24"
ranges = r["service"][uname]["spec"]["loadBalancerSourceRanges"]
assert ranges[0] == "192.168.0.0/24"
assert ranges[1] == "192.168.1.0/24"


def test_master_termination_fixed_enabled():
Expand Down

0 comments on commit 87aa7b1

Please sign in to comment.