add more checks to 01-create-network test

This commit is contained in:
Brian Picciano 2023-09-03 18:08:14 +02:00
parent 56f38ad451
commit 73db21f841
2 changed files with 17 additions and 2 deletions

View File

@ -165,7 +165,11 @@ in rec {
}; };
tests = pkgs.writeScript "isle-tests" '' tests = pkgs.writeScript "isle-tests" ''
export PATH=${pkgs.lib.makeBinPath [ appImage pkgs.busybox ]} export PATH=${pkgs.lib.makeBinPath [
appImage
pkgs.busybox
pkgs.yq-go
]}
export SHELL=${pkgs.bash}/bin/bash export SHELL=${pkgs.bash}/bin/bash
exec ${./tests}/entrypoint.sh "$@" exec ${./tests}/entrypoint.sh "$@"
''; '';

View File

@ -24,8 +24,19 @@ isle admin create-network \
--domain test.isle.com \ --domain test.isle.com \
--hostname primus \ --hostname primus \
--ip-net "10.6.9.1/24" \ --ip-net "10.6.9.1/24" \
--name "testing" --name "testing" \
> admin.yml
[ "$(cat a/meta/isle/rpc_port)" = "3900" ] [ "$(cat a/meta/isle/rpc_port)" = "3900" ]
[ "$(cat b/meta/isle/rpc_port)" = "3910" ] [ "$(cat b/meta/isle/rpc_port)" = "3910" ]
[ "$(cat c/meta/isle/rpc_port)" = "3920" ] [ "$(cat c/meta/isle/rpc_port)" = "3920" ]
[ "$(yq <admin.yml '.creation_params.id')" != "" ]
[ "$(yq <admin.yml '.creation_params.name')" = "testing" ]
[ "$(yq <admin.yml '.creation_params.domain')" = "test.isle.com" ]
bootstrap_file="$XDG_DATA_HOME/isle/bootstrap.yml"
[ "$(yq <"$bootstrap_file" '.admin_creation_params')" = "$(yq <admin.yml '.creation_params')" ]
[ "$(yq <"$bootstrap_file" '.nebula.ca_public_credentials')" = "$(yq <admin.yml '.nebula.ca_credentials.public')" ]
[ "$(yq <"$bootstrap_file" '.hostname')" = "primus" ]