Skip to content

Commit

Permalink
fix: ci tests & add docker-compose local test harness
Browse files Browse the repository at this point in the history
  • Loading branch information
Empty2k12 committed Apr 2, 2024
1 parent 9e2b74b commit 17126aa
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions docker-compose.integrationtest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: '3'
services:
influxdb:
image: influxdb:1.8
ports:
- 8086:8086
authed_influxdb:
image: influxdb:1.8
ports:
- 9086:8086
environment:
INFLUXDB_HTTP_AUTH_ENABLED: true
INFLUXDB_ADMIN_USER: admin
INFLUXDB_ADMIN_PASSWORD: password
INFLUXDB_USER: nopriv_user
INFLUXDB_USER_PASSWORD: password
influxdbv2:
image: influxdb:2.6
ports:
- 2086:8086
environment:
DOCKER_INFLUXDB_INIT_MODE: setup
DOCKER_INFLUXDB_INIT_USERNAME: admin
DOCKER_INFLUXDB_INIT_PASSWORD: password
DOCKER_INFLUXDB_INIT_ORG: testing
DOCKER_INFLUXDB_INIT_BUCKET: mydb
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: admintoken
2 changes: 1 addition & 1 deletion influxdb/tests/integration_tests_v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async fn test_authed_write_and_read() {
},
|| async move {
let client = Client::new("http://127.0.0.1:2086", "mydb").with_token("admintoken");
let read_query = ReadQuery::new("DELETE MEASUREMENT weather");
let read_query = ReadQuery::new("DROP MEASUREMENT \"weather\"");
let read_result = client.query(read_query).await;
assert_result_ok(&read_result);
assert!(!read_result.unwrap().contains("error"), "Teardown failed");
Expand Down

0 comments on commit 17126aa

Please sign in to comment.