tests: containers: Adapt tests to work with restconf

Move the web port used in containers from 80 -> 91
this to not collide with nginx which is required
for restconf.
This commit is contained in:
Mattias Walström
2024-06-27 15:43:06 +02:00
parent df7dab5951
commit 2919c23fde
4 changed files with 8 additions and 4 deletions
@@ -11,7 +11,7 @@ import infamy
from infamy.util import until
def _verify(server):
url = infamy.Furl(f"http://[{server}]/index.html")
url = infamy.Furl(f"http://[{server}]:91/index.html")
return url.check("It works")
with infamy.Test() as test:
@@ -29,6 +29,7 @@ with infamy.Test() as test:
{
"name": f"{NAME}",
"image": f"oci-archive:{infamy.Container.IMAGE}",
"command": "/usr/sbin/httpd -f -v -p 91",
"network": {
"host": True
}
@@ -56,6 +56,7 @@ with infamy.Test() as test:
{
"name": f"{NAME}",
"image": f"oci-archive:{infamy.Container.IMAGE}",
"command": "/usr/sbin/httpd -f -v -p 91",
"mount": [
{
"name": "index.html",
@@ -67,7 +68,7 @@ with infamy.Test() as test:
"interface": [
{ "name": "docker0" }
],
"publish": [ "8080:80" ]
"publish": [ "8080:91" ]
}
}
]
+2 -1
View File
@@ -13,7 +13,7 @@ with infamy.Test() as test:
IMAGE = "curios-httpd-edge.tar.gz"
DUTIP = "10.0.0.2"
OURIP = "10.0.0.1"
URL = f"http://{DUTIP}/index.html"
URL = f"http://{DUTIP}:91/index.html"
with test.step("Initialize"):
env = infamy.Env(infamy.std_topology("1x2"))
@@ -44,6 +44,7 @@ with infamy.Test() as test:
{
"name": f"{NAME}",
"image": f"oci-archive:{infamy.Container.IMAGE}",
"command": "/usr/sbin/httpd -f -v -p 91",
"network": {
"interface": [
{ "name": f"{ifname}" }
+2 -1
View File
@@ -13,7 +13,7 @@ with infamy.Test() as test:
IMAGE = "curios-httpd-edge.tar.gz"
DUTIP = "10.0.0.2"
OURIP = "10.0.0.1"
URL = f"http://{DUTIP}/index.html"
URL = f"http://{DUTIP}:91/index.html"
with test.step("Initialize"):
env = infamy.Env(infamy.std_topology("1x2"))
@@ -67,6 +67,7 @@ with infamy.Test() as test:
{
"name": f"{NAME}",
"image": f"oci-archive:{infamy.Container.IMAGE}",
"command": "/usr/sbin/httpd -f -v -p 91",
"network": {
"interface": [
{ "name": f"{NAME}" }