Skip to content

Commit 8d9e841

Browse files
committed
Updates to address vulnerabilities in upstream dependencies. Fixes influxdb-rs#95
1 parent 9b82de0 commit 8d9e841

File tree

5 files changed

+21
-22
lines changed

5 files changed

+21
-22
lines changed

benches/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ publish = false
77
edition = "2018"
88

99
[dev-dependencies]
10-
chrono = { version = "0.4.11", features = ["serde"] }
10+
chrono = { version = "0.4.23", features = ["clock", "serde"], default-features = false }
1111
futures = "0.3.4"
1212
influxdb = { path = "../influxdb", features = ["derive"] }
13-
tokio = { version = "0.2.22", features = ["macros", "rt-threaded", "sync"] }
13+
tokio = { version = "1.23.0", features = ["macros", "rt-multi-thread", "sync"] }
1414

1515
[[bench]]
1616
name = "client"

influxdb/Cargo.toml

+4-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[package]
44
name = "influxdb"
5-
version = "0.5.2"
5+
version = "0.5.3"
66
authors = ["Gero Gerke <[email protected]>"]
77
edition = "2018"
88
description = "InfluxDB Driver for Rust"
@@ -19,8 +19,8 @@ http = "0.2.4"
1919
influxdb_derive = { version = "0.5.0", optional = true }
2020
lazy_static = "1.4.0"
2121
regex = "1.3.5"
22-
reqwest = { version = "0.11.4", default-features = false, optional = true }
23-
surf = { version = "2.2.0", default-features = false, optional = true }
22+
reqwest = { version = "0.11.13", default-features = false, optional = true }
23+
surf = { version = "2.3.2", default-features = false, optional = true }
2424
serde = { version = "1.0.104", features = ["derive"], optional = true }
2525
serde_json = { version = "1.0.48", optional = true }
2626
thiserror = "1.0"
@@ -34,12 +34,10 @@ use-serde = ["serde", "serde_json"]
3434
curl-client = ["surf", "surf/curl-client"]
3535
h1-client = ["surf", "surf/h1-client"]
3636
h1-client-rustls = ["surf", "surf/h1-client-rustls"]
37-
hyper-client = ["surf", "surf/hyper-client"]
3837
reqwest-client = ["reqwest", "reqwest/native-tls-alpn"]
3938
reqwest-client-rustls = ["reqwest", "reqwest/rustls-tls-webpki-roots"]
4039
wasm-client = ["surf", "surf/wasm-client"]
4140

4241
[dev-dependencies]
43-
async-std = { version = "1.6.5", features = ["attributes", "tokio02", "tokio1"] }
4442
indoc = "1.0"
45-
tokio = { version = "1.7", features = ["macros", "rt-multi-thread"] }
43+
tokio = { version = "1.23", features = ["macros", "rt-multi-thread"] }

influxdb/src/query/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,8 @@ mod tests {
281281
}
282282
#[test]
283283
fn test_timestamp_from_chrono_date() {
284-
let timestamp_from_datetime: Timestamp = Utc.ymd(1970, 1, 1).and_hms(0, 0, 1).into();
284+
let timestamp_from_datetime: Timestamp =
285+
Utc.with_ymd_and_hms(1970, 1, 1, 0, 0, 1).unwrap().into();
285286
assert_eq!(
286287
Timestamp::Nanoseconds(MILLIS_PER_SECOND * NANOS_PER_MILLI),
287288
timestamp_from_datetime

influxdb/tests/derive_integration_tests.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fn test_build_query() {
5151
/// INTEGRATION TEST
5252
///
5353
/// This integration tests that writing data and retrieving the data again is working
54-
#[async_std::test]
54+
#[tokio::test]
5555
#[cfg(not(tarpaulin_include))]
5656
async fn test_derive_simple_write() {
5757
const TEST_NAME: &str = "test_derive_simple_write";
@@ -82,7 +82,7 @@ async fn test_derive_simple_write() {
8282
/// This integration tests that writing data and retrieving the data again is working
8383
#[cfg(feature = "derive")]
8484
#[cfg(feature = "use-serde")]
85-
#[async_std::test]
85+
#[tokio::test]
8686
#[cfg(not(tarpaulin_include))]
8787
async fn test_write_and_read_option() {
8888
const TEST_NAME: &str = "test_write_and_read_option";

influxdb/tests/integration_tests.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use influxdb::{Client, Error, ReadQuery, Timestamp};
1212
/// INTEGRATION TEST
1313
///
1414
/// This test case tests whether the InfluxDB server can be connected to and gathers info about it - tested with async_std
15-
#[async_std::test]
15+
#[tokio::test]
1616
#[cfg(not(tarpaulin_include))]
1717
async fn test_ping_influx_db_async_std() {
1818
let client = create_client("notusedhere");
@@ -46,7 +46,7 @@ async fn test_ping_influx_db_tokio() {
4646
/// INTEGRATION TEST
4747
///
4848
/// This test case tests connection error
49-
#[async_std::test]
49+
#[tokio::test]
5050
#[cfg(not(tarpaulin_include))]
5151
async fn test_connection_error() {
5252
let test_name = "test_connection_error";
@@ -67,7 +67,7 @@ async fn test_connection_error() {
6767
/// INTEGRATION TEST
6868
///
6969
/// This test case tests the Authentication
70-
#[async_std::test]
70+
#[tokio::test]
7171
#[cfg(not(tarpaulin_include))]
7272
async fn test_authed_write_and_read() {
7373
const TEST_NAME: &str = "test_authed_write_and_read";
@@ -115,7 +115,7 @@ async fn test_authed_write_and_read() {
115115
/// INTEGRATION TEST
116116
///
117117
/// This test case tests the Authentication
118-
#[async_std::test]
118+
#[tokio::test]
119119
#[cfg(not(tarpaulin_include))]
120120
async fn test_wrong_authed_write_and_read() {
121121
const TEST_NAME: &str = "test_wrong_authed_write_and_read";
@@ -185,7 +185,7 @@ async fn test_wrong_authed_write_and_read() {
185185
/// INTEGRATION TEST
186186
///
187187
/// This test case tests the Authentication
188-
#[async_std::test]
188+
#[tokio::test]
189189
#[cfg(not(tarpaulin_include))]
190190
async fn test_non_authed_write_and_read() {
191191
const TEST_NAME: &str = "test_non_authed_write_and_read";
@@ -240,7 +240,7 @@ async fn test_non_authed_write_and_read() {
240240
/// INTEGRATION TEST
241241
///
242242
/// This integration tests that writing data and retrieving the data again is working
243-
#[async_std::test]
243+
#[tokio::test]
244244
#[cfg(not(tarpaulin_include))]
245245
async fn test_write_and_read_field() {
246246
const TEST_NAME: &str = "test_write_field";
@@ -273,7 +273,7 @@ async fn test_write_and_read_field() {
273273
/// INTEGRATION TEST
274274
///
275275
/// This integration tests that writing data and retrieving the data again is working
276-
#[async_std::test]
276+
#[tokio::test]
277277
#[cfg(feature = "use-serde")]
278278
#[cfg(not(tarpaulin_include))]
279279
async fn test_write_and_read_option() {
@@ -334,7 +334,7 @@ async fn test_write_and_read_option() {
334334
///
335335
/// This test case tests whether JSON can be decoded from a InfluxDB response and whether that JSON
336336
/// is equal to the data which was written to the database
337-
#[async_std::test]
337+
#[tokio::test]
338338
#[cfg(feature = "use-serde")]
339339
#[cfg(not(tarpaulin_include))]
340340
async fn test_json_query() {
@@ -386,7 +386,7 @@ async fn test_json_query() {
386386
///
387387
/// This test case tests whether the response to a GROUP BY can be parsed by
388388
/// deserialize_next_tagged into a tags struct
389-
#[async_std::test]
389+
#[tokio::test]
390390
#[cfg(feature = "use-serde")]
391391
#[cfg(not(tarpaulin_include))]
392392
async fn test_json_query_tagged() {
@@ -504,7 +504,7 @@ async fn test_json_query_vec() {
504504
/// INTEGRATION TEST
505505
///
506506
/// This integration test tests whether using the wrong query method fails building the query
507-
#[async_std::test]
507+
#[tokio::test]
508508
#[cfg(feature = "use-serde")]
509509
#[cfg(not(tarpaulin_include))]
510510
async fn test_serde_multi_query() {
@@ -580,7 +580,7 @@ async fn test_serde_multi_query() {
580580
/// INTEGRATION TEST
581581
///
582582
/// This integration test tests whether using the wrong query method fails building the query
583-
#[async_std::test]
583+
#[tokio::test]
584584
#[cfg(feature = "use-serde")]
585585
#[cfg(not(tarpaulin_include))]
586586
async fn test_wrong_query_errors() {

0 commit comments

Comments
 (0)