From 8a147dc4dcaa7d827caf4c5c72903ec0d4374d03 Mon Sep 17 00:00:00 2001 From: Robert Hajek Date: Fri, 5 Mar 2021 11:38:42 +0100 Subject: [PATCH] chore: prepare release --- .circleci/config.yml | 4 ++++ test/delete_service_test.dart | 24 ++++++++++-------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index efd88ca..f5bba7b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -73,6 +73,10 @@ workflows: name: dart-2.10 dart-image: "google/dart:2.10" influxdb-image: "influxdb:v2.0.4" + - test: + name: dart-latest + dart-image: "google/dart:latest" + influxdb-image: "influxdb:v2.0.4" - test: name: dart-2.10-nightly dart-image: "google/dart:2.10" diff --git a/test/delete_service_test.dart b/test/delete_service_test.dart index 9bb188a..f30c40c 100644 --- a/test/delete_service_test.dart +++ b/test/delete_service_test.dart @@ -7,19 +7,9 @@ void main() { setUp(() async { setupClient(); - organization = await findMyOrg(); - var bucketsApi = client.getBucketsApi(); - var buckets = await bucketsApi.getBuckets(); - - for (var bucket in buckets.buckets) { - if (bucket.name.endsWith('_IT')) { - print('Delete Bucket: ${bucket.name}'); - await bucketsApi.deleteBucketsID(bucket.id); - } - } bucket = await createTestBucket(); - + print('Created bucket id:${bucket.id} name: ${bucket.name}'); // Create Authorization with permission to read/write created bucket var bucketResource = Resource( type: ResourceTypeEnum.buckets, id: bucket.id, orgID: organization.id); @@ -47,7 +37,11 @@ void main() { debug: client.debug); }); - tearDown(() { + tearDown(() async { + if (bucket != null) { + print('Delete bucket id: ${bucket.id}'); + await client.getBucketsApi().deleteBucketsID(bucket.id); + } client.close(); }); @@ -131,7 +125,8 @@ void main() { var fluxQuery = 'from(bucket:"${bucket.name}") |> range(start: 1970-01-01T00:00:00.000000001Z)'; var records = await client.getQueryService().query(fluxQuery); - List rec = await records.where((record) => record.tableIndex == 0).toList(); + List rec = + await records.where((record) => record.tableIndex == 0).toList(); expect(rec.length, 12); var start = '1970-01-01T00:00:00.000000001Z'; @@ -154,7 +149,8 @@ void main() { var fluxQuery = 'from(bucket:"${bucket.name}") |> range(start: 1970-01-01T00:00:00.000000001Z)'; var records = await client.getQueryService().query(fluxQuery); - List rec = await records.where((record) => record.tableIndex == 0).toList(); + List rec = + await records.where((record) => record.tableIndex == 0).toList(); expect(rec.length, 12); var start = '1970-01-01T00:00:00.000000001Z';