Skip to content

Commit

Permalink
tests: e2e: add real IP sanity test
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb committed Jul 17, 2023
1 parent 8fc4317 commit 1c476f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ grep "Total" log.txt
SPDK_NAME=$(docker-compose ps spdk | awk '/spdk/{print $1}')
SPDK_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "${SPDK_NAME}")

# check sanity with real IP
docker run --rm --network=opi-spdk-bridge_opi --privileged -v /dev/hugepages:/dev/hugepages ghcr.io/opiproject/spdk:main spdk_nvme_perf -r "traddr:${SPDK_IP} trtype:TCP adrfam:IPv4 trsvcid:4444 subnqn:nqn.2016-06.io.spdk:cnode1 hostnqn:nqn.2014-08.org.nvmexpress:uuid:feb98abe-d51f-40c8-b348-2753f3571d3c" -c 0x1 -q 1 -o 4096 -w randread -t 10 | tee log.txt
grep "Total" log.txt

# test nvme
"${grpc_cli[@]}" call --json_input --json_output opi-spdk-server:50051 CreateNvmeSubsystem "{nvme_subsystem_id: 'subsystem1', nvme_subsystem : {spec : {nqn: 'nqn.2022-09.io.spdk:opitest1', serial_number: 'myserial1', model_number: 'mymodel1', max_namespaces: 11} } }"
"${grpc_cli[@]}" call --json_input --json_output opi-spdk-server:50051 CreateNvmeController "{nvme_controller_id: 'controller1', nvme_controller : {spec : {subsystem_id : { value : '//storage.opiproject.org/volumes/subsystem1' }, nvme_controller_id: 2, pcie_id : {physical_function : 0}, max_nsq:5, max_ncq:5 } } }"
Expand Down

0 comments on commit 1c476f8

Please sign in to comment.