Skip to content

Commit

Permalink
clickhouse_client: add integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Andersson007 committed Feb 13, 2024
1 parent d9c0343 commit f54fb17
Showing 1 changed file with 19 additions and 0 deletions.
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']]

0 comments on commit f54fb17

Please sign in to comment.