Skip to content

test: add C FFI integration tests#22

Closed
mattisonchao wants to merge 1 commit intomainfrom
pr/14-c-ffi-tests
Closed

test: add C FFI integration tests#22
mattisonchao wants to merge 1 commit intomainfrom
pr/14-c-ffi-tests

Conversation

@mattisonchao
Copy link
Copy Markdown
Member

Summary

  • Add 7 C integration tests that exercise the full FFI API against a real Oxia server
    • test_put_get: put a key, get it back, verify value
    • test_get_not_found: verify KeyNotFound error for missing key
    • test_delete: put, delete, verify gone
    • test_list: put multiple keys, list range, verify sorted order
    • test_delete_range: put keys, delete range, verify all removed
    • test_put_overwrite: put twice, verify version increases
    • test_binary_value: put/get binary (non-UTF8) data
  • Rust test harness starts Oxia container via testcontainers, compiles the C test with cc, and runs it
  • Add rlib crate type to liboxia-ffi to support integration tests

Test plan

  • All 7 C FFI tests pass locally
  • CI passes (fmt, clippy, build, tests)

- Add 7 C integration tests exercising the full FFI API:
  put/get, get not found, delete, list, delete_range,
  put overwrite, and binary values
- Rust test harness starts Oxia container, compiles C test,
  and runs it against the live server
- Add rlib crate type to support integration tests

Signed-off-by: mattisonchao <mattisonchao@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant