Skip to content

Commit

Permalink
Use httpbin instead of servicenow.com for testing purposes.
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosalberto committed Nov 24, 2023
1 parent e4df31b commit cdbfe96
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions collector/kong/compose/app/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ def config_kong(host, collector):
print(res.text)
# Create the service
res = requests.post(f"http://{host}:8001/services", json={
'name': 'servicenow_service',
'url': 'http://www.servicenow.com',
'name': 'httpbin_service',
'url': 'http://httpbin.org',
})
print(res.text)
# Create the route
res = requests.post(f"http://{host}:8001/services/servicenow_service/routes", json={
'paths': ['/servicenow'],
'name': 'servicenow_route',
res = requests.post(f"http://{host}:8001/services/httpbin_service/routes", json={
'paths': ['/httpbin'],
'name': 'httpbin_route',
})
print(res.text)
except Exception as e:
Expand All @@ -59,7 +59,7 @@ def send_requests(url):
collector = os.getenv("COLLECTOR_HOST", "localhost")
config_kong(host, collector)

target = f"http://{host}:8000/servicenow/company.html"
target = f"http://{host}:8000/httpbin/get"
while True:
send_requests(target)
time.sleep(.5)

0 comments on commit cdbfe96

Please sign in to comment.