diff options
author | Chad Smith <chad.smith@canonical.com> | 2017-08-31 16:24:35 -0600 |
---|---|---|
committer | Chad Smith <chad.smith@canonical.com> | 2017-08-31 16:24:35 -0600 |
commit | 1770a1eb647d24e14732194e72210ea494986ad2 (patch) | |
tree | 4e60f7195476763bc23bcd219f0b2c1605055b4c /doc/rtd | |
parent | 7e76c57b590c7c2c13f7b1a2a8b5b7d4f2d18396 (diff) | |
download | vyos-cloud-init-1770a1eb647d24e14732194e72210ea494986ad2.tar.gz vyos-cloud-init-1770a1eb647d24e14732194e72210ea494986ad2.zip |
tests: Stop leaking calls through unmocked metadata addresses
DataSourceEc2 behavior changed to first check a minimum acceptable
metadata version uri http://169.154.169.254/<min_version>/instance-id,
retrying on 404, until the metadata service is available. After the
metadata service is up, the datasource inspects preferred
extended_metadata_versions for availability. Unit tests only mocked the
preferred extended_metadata_version so all Ec2 tests were retrying
attempts against
http://169.254.169.254/meta-data/<min-version>/instance-id adding a lot of
time cost to the unit test runs.
This branch uses httpretty to properly mock the following:
- 404s from metadata on undesired extended_metadata_version test routes
- https://169.254.169.254/meta-data/2016-09-02/instance-id
- full metadata dictionary represented on min_metadata_version
- https://169.254.169.254/meta-data/2016-09-02/*
The branch also tightens httpretty to raise a MockError for any URL which
isn't mocked via httpretty.HTTPretty.allow_net_connect=False.
LP: #1714117
Diffstat (limited to 'doc/rtd')
0 files changed, 0 insertions, 0 deletions