Add xyz or org to invalid REST path tests
bmcweb supports multiple REST based interfaces and protocols so it can
not assume a dbus type error response to invalid paths that do not map
to a dbus backed interface. Tests need to be updated to pass a dbus
backed root path (i.e. /xyz or /org).
Resolves openbmc/bmcweb#26
Change-Id: Id77427d8806671c4fe4d809c3d093e4cbcd1ab55
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 7935509..a7490c4 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -355,7 +355,7 @@
${HTTP_OK} /xyz/
${HTTP_OK} /xyz/openbmc_project/
${HTTP_OK} /xyz/openbmc_project/state/enumerate
- ${HTTP_NOT_FOUND} /i/dont/exist/
+ ${HTTP_NOT_FOUND} /xyz/i/dont/exist/
```
Python Coding Guidelines
diff --git a/tests/test_rest_interfaces.robot b/tests/test_rest_interfaces.robot
index eab7de2..1693f45 100644
--- a/tests/test_rest_interfaces.robot
+++ b/tests/test_rest_interfaces.robot
@@ -252,7 +252,7 @@
# Expect status URL Path
${HTTP_OK} /xyz/openbmc_project/
${HTTP_OK} /xyz/openbmc_project/state/enumerate
- ${HTTP_NOT_FOUND} /i/dont/exist/
+ ${HTTP_NOT_FOUND} /xyz/i/dont/exist/
Get Data
@@ -275,7 +275,7 @@
# URL Path Expect Data
/xyz/openbmc_project/ /xyz/openbmc_project/logging
- /i/dont/exist/ path or object not found
+ /org/i/dont/exist/ path or object not found
Put Response Codes
@@ -287,7 +287,7 @@
# Expect status URL Path
${HTTP_METHOD_NOT_ALLOWED} /
${HTTP_METHOD_NOT_ALLOWED} /xyz/
- ${HTTP_METHOD_NOT_ALLOWED} /i/dont/exist/
+ ${HTTP_METHOD_NOT_ALLOWED} /xyz/i/dont/exist/
Put Data Validation
@@ -309,7 +309,7 @@
# Expect status URL Path
${HTTP_METHOD_NOT_ALLOWED} /
${HTTP_METHOD_NOT_ALLOWED} /xyz/
- ${HTTP_METHOD_NOT_ALLOWED} /i/dont/exist/
+ ${HTTP_METHOD_NOT_ALLOWED} /xyz/i/dont/exist/
${HTTP_METHOD_NOT_ALLOWED} /xyz/login