From 9af65f7293b517e5fa8a9d145c3009e655541c16 Mon Sep 17 00:00:00 2001 From: reubenmiller Date: Sat, 15 Jun 2024 15:34:31 +0200 Subject: [PATCH] add test with thin-edge.io use-case --- tests/manual/sessions/sessions_set.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/manual/sessions/sessions_set.yaml b/tests/manual/sessions/sessions_set.yaml index b9737c749..74448eb8f 100644 --- a/tests/manual/sessions/sessions_set.yaml +++ b/tests/manual/sessions/sessions_set.yaml @@ -205,3 +205,24 @@ tests: - panic contains: - A c8y session has not been loaded. Please create or activate a session and try again + + It supports requests without authorization and only setting C8Y_HOST: + command: | + env -i PATH="$PATH" C8Y_HOST="http://localhost:8001/c8y" \ + c8y inventory list --pageSize 1 --dry --dryFormat json -c=false + exit-code: 0 + stdout: + exactly: | + { + "url": "http://localhost:8001/c8y/inventory/managedObjects?pageSize=1", + "host": "http://localhost:8001", + "pathEncoded": "/c8y/inventory/managedObjects?pageSize=1", + "path": "/c8y/inventory/managedObjects", + "query": "pageSize=1", + "method": "GET", + "headers": { + "Accept": "application/json" + }, + "shell": "curl -X 'GET' -H 'Accept: application/json' 'http://{host}/c8y/inventory/managedObjects?pageSize=1'", + "powershell": "curl -X 'GET' -H 'Accept: application/json' 'http://{host}/c8y/inventory/managedObjects?pageSize=1'" + }