{"id":24390413,"url":"https://github.com/pgedge/platform_test","last_synced_at":"2025-04-11T09:15:10.824Z","repository":{"id":244135960,"uuid":"811985642","full_name":"pgEdge/platform_test","owner":"pgEdge","description":"pgeEdge Platform Test Scripts","archived":false,"fork":false,"pushed_at":"2025-01-15T15:45:32.000Z","size":96882,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-15T17:57:55.191Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pgEdge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-07T17:51:50.000Z","updated_at":"2024-08-27T17:59:59.000Z","dependencies_parsed_at":"2024-10-25T20:55:10.232Z","dependency_job_id":"5e94ea7b-b96b-445e-b077-610c2facaf0b","html_url":"https://github.com/pgEdge/platform_test","commit_stats":null,"previous_names":["pgedge/platform_test"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgEdge%2Fplatform_test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgEdge%2Fplatform_test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgEdge%2Fplatform_test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgEdge%2Fplatform_test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pgEdge","download_url":"https://codeload.github.com/pgEdge/platform_test/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234663116,"owners_count":18868100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-19T16:17:24.212Z","updated_at":"2025-01-19T16:17:25.016Z","avatar_url":"https://github.com/pgEdge.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Using the Test Harness\n\n### The test harness directory structure in the cli repo\n\n`test` - contains the test harness, and is where you must invoke the tests from.\n\n`test/schedule_files` - contains the schedule files; each schedule file is made up of a set of scripts that set up and tear down a cluster.\n\n`test/t` - contains the test scripts and a file of the python utilities (util_test.py).\nTest scripts can be written in either perl (file.pl) or python (file.py) and the file types used can be mixed within a schedule.\n\n`test/t/lib` - contains the environment variable file and the perl utility files. Source the environment variable file before running the scripts.\n\n### Prerequisites on a clean Rocky 9 VM to run the test harness\n\nDisable `firewalld`\n    You can use the following command to disable firewalld: \n    `sudo systemctl stop firewalld`\n\nConfigure passwordless `sudo`\n    To configure passwordless sudo, edit the `/etc/sudoers` file.  Locate the line that contains i`includedir /etc/sudoers.d`; add a line below that line that specifies: `%your_user_name ALL=(ALL) NOPASSWD:ALL`\n\nConfigure passwordless `ssh`\n    To configure passwordless ssh, execute the following commands:\n    ```sh\n    ssh-keygen -t rsa\n    cd ~/.ssh\n    cat id_rsa.pub \u003e\u003e authorized_keys\n    chmod 700 ~/.ssh \u0026\u0026 chmod 600 ~/.ssh/authorized_keys\n    ```\n\nDisable `SELinux`\n    To disable SELinux, edit the `/etc/sysconfig/selinux` file, setting `SELINUX=disabled`; then reboot your system.\n\n`yum update`\n\n`cd ~/`\n`mkdir work`\n`cd work`\n`yum install git`\n\nClone the cli git repo into `work`:\n\n`git clone https://github.com/pgEdge/platform_test.git`\n\nMove into the `test` directory:\n\n`cd platform_test`\n\nEnsure that any prerequisites are met:\n\n`sudo yum install curl`\n`sudo yum install perl`\n`sudo yum install perl-CPAN`\n`sudo dnf install perl-File-Which`\n`sudo dnf install perl-Try-Tiny`\n`sudo dnf install perl-JSON`\n`sudo dnf install perl-List-MoreUtils`\n`sudo dnf install perl-DBD-Pg`\n`sudo dnf install perl-DBD-DBI`\n`sudo dnf install python3`\n`sudo dnf --enablerepo=devel`\n`sudo dnf install python3-psycopg2`\n`sudo yum install pip`\n`pip install python-dotenv`\n`pip install psycopg`\n\nReview the environment variables in the `t/lib/config.env` file and make any adjustments required; then source the environment variables:\n\n`source t/lib/config.env`\n\nThen you're ready to run a test.\n\n### Invoking the test harness (`runner.py`)\n\nInvoke the following commands from the `test` directory.\n\nUse the following command to invoke a schedule:\n`runner.py -s schedule_files/schedule_file_name`\n\nUse the following command to invoke a test script:\n`runner.py -t t/script_name`\n\nThere is also a help file for the test script:\n`runner.py --help`\n\nTo see a list of the environment variables used, invoke the following command:\n`perl t/lib/variables.pl`\n\nAs each test script executes (individually or through a schedule), it returns a `pass` or `fail` on the command line. The result of each file executed, along with the commands invoked and detailed log are also written to a timestamped logfile (symlinked to `latest.log`) in the `test` directory.\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgedge%2Fplatform_test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpgedge%2Fplatform_test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgedge%2Fplatform_test/lists"}