Skip to content

Commit

Permalink
test(storage): run cli cmds in docker-compose
Browse files Browse the repository at this point in the history
Signed-off-by: Artsiom Koltun <artsiom.koltun@intel.com>
  • Loading branch information
artek-koltun committed Feb 2, 2024
1 parent cf31f02 commit 11b1a21
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,19 @@ services:
depends_on:
opi-spdk-server:
condition: service_healthy
command: storage test --addr opi-spdk-server:50051
entrypoint: [ "/bin/sh", "-c", "-x" ]
command: |
'/dpu storage test --addr opi-spdk-server:50051 && \
nvmf0=$$(/dpu storage create backend nvme controller --addr=opi-spdk-server:50051 --id nvmf0 --multipath failover) && \
path0=$$(/dpu storage create backend nvme path tcp --addr=opi-spdk-server:50051 --controller "$$nvmf0" --id path0 --ip $$(getent hosts spdk | cut -d" " -f1) --port 4444 --nqn nqn.2016-06.io.spdk:cnode1 --hostnqn nqn.2014-08.org.nvmexpress:uuid:feb98abe-d51f-40c8-b348-2753f3571d3c) && \
ss0=$$(/dpu storage create frontend nvme subsystem --addr=opi-spdk-server:50051 --id subsys0 --nqn "nqn.2022-09.io.spdk:opitest1") && \
ctrl0=$$(/dpu storage create frontend nvme controller tcp --addr=opi-spdk-server:50051 --id ctrl0 --ip "127.0.0.1" --port 4420 --subsystem "$$ss0") && \
ns0=$$(/dpu storage create frontend nvme namespace --addr=opi-spdk-server:50051 --id namespace0 --volume "Malloc0" --subsystem "$$ss0") && \
/dpu storage delete frontend nvme namespace --addr=opi-spdk-server:50051 --name "$$ns0" && \
/dpu storage delete frontend nvme controller --addr=opi-spdk-server:50051 --name "$$ctrl0" && \
/dpu storage delete frontend nvme subsystem --addr=opi-spdk-server:50051 --name "$$ss0"' && \
/dpu storage delete backend nvme path --addr=opi-spdk-server:50051 --name $$path0 && \
/dpu storage delete backend nvme controller --addr=opi-spdk-server:50051 --name "$$nvmf0" && \
opi-test:
image: docker.io/library/alpine:3.19
Expand Down

0 comments on commit 11b1a21

Please sign in to comment.