Skip to content

Commit c393d5b

Browse files
committed
feat: Test GET from Inventory
Inventory is tested along with Ingress and an API ping. Hosts are listed as the most basic Inventory GET request.
1 parent 243d24e commit c393d5b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

insights/client/connection.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def __init__(self, config):
136136
self.inventory_url = self.api_url + "/inventory/v1"
137137

138138
if self.config.legacy_upload:
139-
self.ping_url = self.base_url
139+
self.ping_url = self.base_url + "/"
140140
else:
141141
self.ping_url = self.base_url + '/apicast-tests/ping'
142142

@@ -356,7 +356,7 @@ def _legacy_test_urls(self, url, method):
356356
url = urlparse(url)
357357
test_url = url.scheme + "://" + url.netloc
358358
last_ex = None
359-
paths = (url.path + '/', '', '/r', '/r/insights')
359+
paths = (url.path, '', '/r', '/r/insights')
360360
log_level = NETWORK if self.config.verbose else logging.DEBUG
361361
for ext in paths:
362362
try:
@@ -494,6 +494,7 @@ def test_connection(self, rc=0):
494494

495495
for description, url, method in [
496496
("Uploading a file to Ingress", self.upload_url, "POST"),
497+
("Getting hosts from Inventory", self.inventory_url + "/hosts", "GET"),
497498
("Pinging the API", self.ping_url, "GET"),
498499
]:
499500
logger.info(" %s...", description)

0 commit comments

Comments
 (0)