-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix For read_health_status() Exception Handling (#347)
* Add url param for create_client * Install consul for test cases involving Vault HA * Update test harness with optional Vault HA / consul set up * Add regerssion test cases for issue #339 * Add raise_exception param to requests * Use raise_exception param in read_health_status method * Add ipaddress module per github.com/urllib3/urllib3/issues/1117? Somehow ended up with this urllib3 error for python 2.7 otherwise: "urllib3.connection: ERROR: Certificate did not match expected hostname: 127.0.0.1. Certificate: {'serialNumber': u'8D267F50728FF454', 'subject': ((('commonName', u'localhost'),),), 'notAfter': 'May 14 22:44:13 2025 GMT', 'notBefore': u'May 17 22:44:13 2015 GMT', 'subjectAltName': (('DNS', 'localhost'), ('IP Address', '127.0.0.1')), 'issuer': ((('commonName', u'localhost'),),), 'version': 3L} * Clarify docstring a bit * Also add cases to cover both HEAD and GET methods * Remove standby node magic strings; use method instead
- Loading branch information
Showing
11 changed files
with
245 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
codecov | ||
coverage | ||
ipaddress>=1.0.22 | ||
mock | ||
nose | ||
parameterized | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
listener "tcp" { | ||
address = "127.0.0.1:8200" | ||
tls_cert_file = "tests/config_files/server-cert.pem" | ||
tls_key_file = "tests/config_files/server-key.pem" | ||
} | ||
|
||
disable_mlock = true | ||
|
||
default_lease_ttl = "768h" | ||
max_lease_ttl = "768h" | ||
|
||
storage "consul" { | ||
address = "127.0.0.1:8500" | ||
path = "vault" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
listener "tcp" { | ||
address = "127.0.0.1:8199" | ||
cluster_address = "127.0.0.1:8201" | ||
tls_cert_file = "tests/config_files/server-cert.pem" | ||
tls_key_file = "tests/config_files/server-key.pem" | ||
} | ||
|
||
disable_mlock = true | ||
|
||
default_lease_ttl = "768h" | ||
max_lease_ttl = "768h" | ||
|
||
storage "consul" { | ||
address = "127.0.0.1:8500" | ||
path = "vault" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
set -eux | ||
|
||
DEFAULT_CONSUL_VERSION=1.4.0 | ||
HVAC_CONSUL_VERSION=${1:-$DEFAULT_CONSUL_VERSION} | ||
|
||
function install_consul_release() { | ||
mkdir -p $HOME/bin | ||
|
||
cd /tmp | ||
|
||
curl -sOL https://releases.hashicorp.com/consul/${HVAC_CONSUL_VERSION}/consul_${HVAC_CONSUL_VERSION}_linux_amd64.zip | ||
unzip consul_${HVAC_CONSUL_VERSION}_linux_amd64.zip | ||
mv consul $HOME/bin | ||
} | ||
|
||
install_consul_release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.