Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clickhouse_client: add integration tests #31

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions tests/integration/targets/clickhouse_client/tasks/initial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,22 @@
ansible.builtin.assert:
that:
- result.result[0] != []


- name: Create table with Decimal and DateTime columns
community.clickhouse.clickhouse_client:
execute: CREATE TABLE decimal_datetime (x Decimal(12,4), y DateTime) ENGINE = Memory

- name: Insert Decimal and DateTime
community.clickhouse.clickhouse_client:
execute: "INSERT INTO decimal_datetime VALUES ('4.01', '2019-01-01 00:00:00')"

- name: Insert Decimal and DateTime
register: result
community.clickhouse.clickhouse_client:
execute: "SELECT * FROM decimal_datetime"

- name: Check the ret vals
ansible.builtin.assert:
that:
- result.result == [[4.01, '2019-01-01T00:00:00']]
Loading