diff --git a/tests/access.ut b/tests/access.sh similarity index 92% rename from tests/access.ut rename to tests/access.sh index 400d575..c615732 100755 --- a/tests/access.ut +++ b/tests/access.sh @@ -1,13 +1,15 @@ # OpenLAN Access UT. -source $PWD/macro.ut +source $PWD/macro.sh -function setup() { +setup_net() { docker network inspect net1 || { docker network create net1 \ --driver=bridge --subnet=172.255.0.0/24 --gateway=172.255.0.1 } +} +setup_sw1() { mkdir -p /opt/openlan/sw1 mkdir -p /opt/openlan/sw1/etc/openlan/switch cat > /opt/openlan/sw1/etc/openlan/switch/switch.yaml < /opt/openlan/sw1/etc/openlan/access/t1.yaml < /opt/openlan/sw1/etc/openlan/access/t2.yaml < /opt/openlan/$name/etc/openlan/switch/switch.yaml < /opt/openlan/$name/etc/openlan/switch/switch.yaml <