crate / crate/crash

Use CrateDB test layer based on "Testcontainers", in order to improve platform coverage

Open
#402 1 comment 0 reactions 0 assignees View on GitHub
testing
Dominant language
Python
Stars
49
Forks
16
PR merge metrics
No merged PRs in 30d

Description

## Goal

Extend platform / operating system coverage when testing CrateDB and associated infrastructure.

## Introduction

At [Testcontainers for Java and CrateDB](https://github.com/crate/cratedb-examples/tree/main/testing/testcontainers/java), we demonstrate how to run integration tests of Java applications with CrateDB, based on [Testcontainers for Java](https://github.com/testcontainers/testcontainers-java).

Based on observations at GH-343, https://github.com/crate/crate-python/pull/388, or https://github.com/mfussenegger/cr8/pull/337, we experience problems with different hand-made test layers for CrateDB, written in Python. They may have their advantages, but are not platform agnostic, so they can't be used on macOS and Windows platforms without further ado.

Currently, the integration tests here are only being invoked on Linux.
https://github.com/crate/crash/blob/623ffb33bea81fcdae38e7b0c2929ac9bc7da503/tests/test_integration.py#L28-L29

## Proposal

On behalf of two other projects, we started the corresponding [Testcontainers for Python](https://github.com/testcontainers/testcontainers-python) implementation, and converged it into the [cratedb-toolkit](https://github.com/crate-workbench/cratedb-toolkit) package, to make it reusable by downstream packages like `crash`, `crate-python`, and others.

- https://github.com/crate-workbench/cratedb-toolkit/issues/57

This issue outlines what is needed to make the test layer usable here.

- https://github.com/crate-workbench/cratedb-toolkit/issues/58

## Task

Use the `unittest`-based adapter conceived to resolve https://github.com/crate-workbench/cratedb-toolkit/issues/58 here, instead of `crate.testing.layer` in crash's [tests/test_integration.py](https://github.com/crate/crash/blob/master/tests/test_integration.py). Contributions are very welcome.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.