From 3c34dc01a8d915d4869dca469c6ca7d7e2e15a71 Mon Sep 17 00:00:00 2001 From: SHWETHA K ACHARYA Date: Wed, 9 Aug 2023 20:36:42 +0530 Subject: [PATCH] README.md: Add details on how the tests are run Information on working of sit-test-cases and the steps to manually run the individual tests of sit-test-cases are missing. Adding this data helps new contributers to quickly dive into development. So added details and quick steps to start with individual tests. Fixes: #19 Signed-off-by: Shwetha K Acharya --- README.md | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- conftest.py | 0 2 files changed, 50 insertions(+), 1 deletion(-) delete mode 100644 conftest.py diff --git a/README.md b/README.md index 0978db5..6f35327 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,53 @@ # Samba integration tests -This branch contains the actual tests for the cluster nodes and are run on the client machines. +The tests are part of the Samba Integrated testing project +[sit-environment](https://github.com/samba-in-kubernetes/sit-environment) +and are primarily used to test Samba servers exporting a clustered +filesystem such as cephfs, glusterfs and others. +### Prerequisite: +The tests are designed to run against any SMB server. The only +prerequisite is that we have a SMB server exporting a filesystem which +can be accessed over the network. +Refer: +[server_setup](https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Standalone_Server) +[filesytem_export_with_glusterfs](https://wiki.samba.org/index.php/Samba_CTDB_GlusterFS_Cluster_HowTo) + +### Quick guide on running the test-cases: +- Install sit-test-cases + ``` + $ git clone https://github.com/samba-in-kubernetes/sit-test-cases.git + ``` + +- Rename test-info.yml.example file under sit-test-cases to test-info.yml + ``` + $ cd sit-test-cases + $ mv test-info.example test-info.yml + ``` + +- Update the relevant information in test-info.yml such as private and + public interfaces, exported share names and test users and passwords from the + previously set up samba server. + +- Run make sanity_test to confirm the sanity of the setup before running the tests + (Can be used whenever new set of changes are introduced in sit-test-cases): + ``` + $ make sanity_test + ``` + +- Run full test suite using make test: + ``` + $ make test + ``` + +- Run individual test cases(can be used for debugging): + ``` + $ pwd + $ /path/to/repo/sit-test-cases + + $ PYTHONPATH=`pwd` TESTINFO_FILE=test-info.yml pytest -v testcases/smbtorture + ``` + +NOTE: +- Some tests are performed against a share mounted using the cifs kernel module. + This particular action requires root access. diff --git a/conftest.py b/conftest.py deleted file mode 100644 index e69de29..0000000