Skip to content

Latest commit

 

History

History
52 lines (36 loc) · 1.52 KB

File metadata and controls

52 lines (36 loc) · 1.52 KB

Aerospike HHVM Client PHPT Tests

Source Code

PHPT scripts are grouped by functionality inside src/aerospike/tests/. Each .inc file contains the methods used by individual .phpt within the respective src/aerospike/tests/phpt/*/ subdirectory.

For example, the Put test cases are described by the list of src/aerospike/tests/phpt/Put/*.phpt files, which make use of methods from src/aerospike/tests/Put.inc.

Expected Values

The structure of PHPT tests is explained at the PHP QA site.

The expected value for a test is the name of one of the Aerospike class constants, such as OK or ERR_RECORD_NOT_FOUND as listed in src/aerospike/tests/astestframework/astest-phpt-loader.inc.

Configuration:

cd src/aerospike/
cp tests/aerospike.local.skeleton tests/aerospike.local.inc
```
Edit the file `tests/aerospike.local.inc` with the IP address and port
of a node in your Aerospike cluster before running the phpt scripts.

## Running Tests:

To run the testcases you can set environment variable `HHVM_EXECUTABLE` with HHVM executable.

```
cd src/aerospike/
./scripts/test.sh tests/phpt
```

To run only the phpt test cases for Put:
```
./scripts/test.sh tests/phpt/Put
```

### Troubleshooting

Please use a standard build (without the **-l** flag), as a debug build will
cause the tests to fail.

## Cleanup

To clean up artifacts created by the tests you can run:
    Change directory to `aerospike-client-hhvm/src/aerospike` and run:

    ./scripts/test-cleanup.sh