diff --git a/README.md b/README.md index 0978db5..8a366d0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,61 @@ # Samba integration tests -This branch contains the actual tests for the cluster nodes and are run on the client machines. +This repo contains tests for Samba when used with Clustered or other Software-Defined Storage systems. +[sit-environment](https://github.com/samba-in-kubernetes/sit-environment) creates an environment on which these tests can be run using vagrant by setting up +virtual machines with the desired backend storage, ctdb and samba. +Ansible playbooks in sit-environment run the tests in [sit-test-cases](https://github.com/samba-in-kubernetes/sit-test-cases) on the client machines created by sit-environment. + + + +## Steps to manually run the individual tests in sit-environment on a local machine: + +PRE-REQUISITES: +- [sit-environment](https://github.com/samba-in-kubernetes/sit-environment) should be locally intalled. +- After installation, sit-environment should be setup using [setup guide](https://github.com/samba-in-kubernetes/sit-environment/blob/main/docs/Fedora-Setup.md) + + +STEPS TO RUN INDIVIDUAL SIT TEST CASES: +- check the vagrant status to know the status of machines created by the sit-environment + ``` + # pwd + /home//sit-environment + # cd vagrant + # vagrant status + Current machine states: + + setup0 running (libvirt) + client0 running (libvirt) + storage0 running (libvirt) + storage1 running (libvirt) + ``` + +- Log in to client0 in order to manually run the tests on the client + ``` + # vagrant ssh client0 + ``` +- Change to root user + ``` + # sudo -i + ``` +- Enter samba-integration-tests + ``` + # cd samba-integration-tests + ``` + +- Export essential PATH variables inorder to access pytest and test-info.yml: + ``` + # PYTHONPATH=. + # TEST_INFO_FILE=test-info.yml + # PATH=$PATH:/usr/local/bin + # export PYTHONPATH TEST_INFO_FILE PATH + ``` + +- Run the required test cases manually using pytest + ``` + # pytest -v test/case/path + ``` + Example: + ``` + # pytest -v testcases/smbtorture/test_smbtorture.py + ```