mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fix the http_mock response
This commit is contained in:
parent
841123dd06
commit
53068b2aa7
1 changed files with 1 additions and 16 deletions
|
@ -26,23 +26,8 @@ def configure_loader_modules():
|
|||
def test_metadata_gce_search():
|
||||
def mock_http(url="", headers=False, header_list=None):
|
||||
metadata_vals = {
|
||||
"http://169.254.169.254/computeMetadata/v1/": {
|
||||
"body": "instance/\nproject/",
|
||||
"headers": {"Content-Type": "text/plain", "Metadata-Flavor": "Google"},
|
||||
},
|
||||
"http://169.254.169.254/computeMetadata/v1/instance/": {
|
||||
"body": "test",
|
||||
"headers": {"Content-Type": "text/plain", "Metadata-Flavor": "Google"},
|
||||
},
|
||||
"http://169.254.169.254/computeMetadata/v1/instance/test": {
|
||||
"body": "fulltest",
|
||||
"headers": {
|
||||
"Content-Type": "application/octet-stream",
|
||||
"Metadata-Flavor": "Google",
|
||||
},
|
||||
},
|
||||
"http://169.254.169.254/computeMetadata/v1/?alt=json&recursive=true": {
|
||||
"body": "recursetest",
|
||||
"body": '{"instance": {"test": "fulltest"}}',
|
||||
"headers": {
|
||||
"Content-Type": "application/octet-stream",
|
||||
"Metadata-Flavor": "Google",
|
||||
|
|
Loading…
Add table
Reference in a new issue