From 8bacfa9e39cb7fb14bfd23d7bca682f91ea8ffdc Mon Sep 17 00:00:00 2001 From: Dmitry Dunaev <83591011+dunaev-opsfleet@users.noreply.github.com> Date: Thu, 17 Nov 2022 16:18:40 +0300 Subject: [PATCH] [WIFI-11619] Upd: Docker instructions update (#739) Signed-off-by: Dmitry Dunaev Signed-off-by: Dmitry Dunaev --- README.md | 3 +++ docker/README.md | 19 ++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 17d6cce2e..5e781f4d4 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,9 @@ npm install -g allure-commandline --save-dev ``` +# Docker Setup Instructions + +This repository support building Docker image from bundled [Dockerfile](./docker/Dockerfile). If you want to use it for testing, please refer to the [related directory for details](./docker). ### Executing and Contributing new test cases diff --git a/docker/README.md b/docker/README.md index 1b754a33e..566ee4111 100644 --- a/docker/README.md +++ b/docker/README.md @@ -3,11 +3,28 @@ ### Building a docker image From the root directory of this repository (wlan-testing) run the following command: + ```bash docker build -f ./docker/Dockerfile -t wlantest . ``` + This will produce a docker image, which you can verify by running docker images command. +By default image will run [setup_env.bash](../setup_env.bash) that will install all required dependencies for tests against all supported devices and version 2 of Cloud SDK (see https://github.com/Telecominfraproject/wlan-cloud-ucentral-deploy/ for details). + +If you want to modify this logic, you may pass different build arguments to the build. Supported arguments: + +- CLOUDSDK_LIBRARY - Cloud SDK library that should be used for tests (by default `tip_2x` will be used); +- TEST_DEVICE_NAME - device type that should be installed as a depencency (by default `all` will be used). + +Check [setup_env.bash](../setup_env.bash) for more details on supported parameters. + +Example on how to pass build arguments: + +```bash +docker build -f ./docker/Dockerfile -t wlantest --build-arg TEST_DEVICE_NAME=lanforge . +``` + ### Running a docker image From the root directory of this repository (wlan-testing) run the following command. This command executes @@ -16,4 +33,4 @@ configuration.py and replace ${YOUR_ALLURE_RESULTS_DIR} with your allure result ```bash docker run -i -t -v $(YOUR_ALLURE_RESULT_DIR):/allure-results -v $(pwd)/configuration.py:/wlan-testing/configuration.py wlantest /bin/bash -c "cd tests; pytest -s -vvv --testbed=basic-02 -m client_connectivity_test --skip-testrail --alluredir=/allure-result" -``` \ No newline at end of file +```