Skip to content

Commit

Permalink
Fix nginx test
Browse files Browse the repository at this point in the history
Use awk instead of cut to make the test robust against any extra
space that may occur in the output from "eden pod ps".
Also fixed is the misspelling in the test file name.

Signed-off-by: Milan Lenco <milan@zededa.com>
  • Loading branch information
milan-zededa authored and giggsoff committed Nov 25, 2023
1 parent 87f7b8a commit 9611e40
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/test-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ eden eve reset
eden test tests/eclient -e port_switch -t 20m
eden eve reset
# Just a simple test of nginx image -- tested in port_switch test
#eden test tests/eclient -e ngnix -t 20m
#eden test tests/eclient -e nginx -t 20m
eden test tests/eclient -e maridb -t 20m
eden eve reset
## tests/escript
Expand Down Expand Up @@ -89,7 +89,7 @@ eden test tests/workflow -e host-only -a '-testdata ../eclient/testdata/'
eden eve reset
eden test tests/workflow -e networking_light -a '-testdata ../eclient/testdata/'
eden eve reset
eden test tests/workflow -e ngnix -a '-testdata ../eclient/testdata/'
eden test tests/workflow -e nginx -a '-testdata ../eclient/testdata/'
eden eve reset
eden test tests/workflow -e maridb -a '-testdata ../eclient/testdata/'
eden eve reset
Expand Down
2 changes: 1 addition & 1 deletion tests/eclient/eden.eclient.tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ eden.escript.test -test.run TestEdenScripts/nw_switch -test.timeout 20m
eden.escript.test -test.run TestEdenScripts/port_switch -test.timeout 20m
eden.escript.test -test.run TestEdenScripts/port_forward -test.timeout 20m
# Just a simple test of nginx image -- tested in port_switch test
#eden.escript.test -test.run TestEdenScripts/ngnix -test.timeout 20m
#eden.escript.test -test.run TestEdenScripts/nginx -test.timeout 20m
eden.escript.test -test.run TestEdenScripts/maridb -test.timeout 20m
eden-ports.sh 2223:2223 2224:2224
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
[!exec:sleep] stop
[!exec:ssh] stop
[!exec:chmod] stop
[!exec:awk] stop

exec chmod 600 {{EdenConfig "eden.tests"}}/eclient/image/cert/id_rsa

Expand Down Expand Up @@ -50,7 +51,7 @@ done

-- server_ip.sh --
EDEN={{EdenConfig "eden.root"}}/{{EdenConfig "eden.bin-dist"}}/{{EdenConfig "eden.eden-bin"}}
echo export ESERVER_IP=$(grep "^$1\s" pod_ps | cut -f 4) > env
echo export ESERVER_IP=$(grep "^$1\s" pod_ps | awk '{print $4}') > env

-- run_client.sh --
. ./env
Expand Down
2 changes: 1 addition & 1 deletion tests/workflow/eden.workflow.tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ eden.escript.test -testdata ../app/testdata/ -test.run TestEdenScripts/2dockers_
/bin/echo Testing replacement of one application with another (27.2/{{$tests}})
eden.escript.test -testdata ../app/testdata/ -test.run TestEdenScripts/app_replace_test
/bin/echo Eden Nginx (28/{{$tests}})
eden.escript.test -testdata ../eclient/testdata/ -test.run TestEdenScripts/ngnix
eden.escript.test -testdata ../eclient/testdata/ -test.run TestEdenScripts/nginx

/bin/echo Eden Mariadb (29.1/{{$tests}})
eden.escript.test -testdata ../eclient/testdata/ -test.run TestEdenScripts/maridb
Expand Down
2 changes: 1 addition & 1 deletion tests/workflow/networking.tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ eden.escript.test -testdata ../vnc/testdata/ -test.run TestEdenScripts/vnc_test
eden.escript.test -testdata ../eclient/testdata/ -test.run TestEdenScripts/air-gapped-switch

/bin/echo Eden Nginx (17/{{$tests}})
eden.escript.test -testdata ../eclient/testdata/ -test.run TestEdenScripts/ngnix
eden.escript.test -testdata ../eclient/testdata/ -test.run TestEdenScripts/nginx

/bin/echo Verifying that we can use a switch network instance on a management port (18/{{$tests}})
eden.escript.test -testdata ../eclient/testdata/ -test.run TestEdenScripts/app_nonat
Expand Down

0 comments on commit 9611e40

Please sign in to comment.