Skip to content
Open
Show file tree
Hide file tree
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: 6 additions & 13 deletions aw-client-rust/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,17 @@ mod test {
println!("Buckets: {buckets:?}");
let mut event = Event {
id: None,
timestamp: DateTime::from_utc(
DateTime::parse_from_rfc3339("2017-12-30T01:00:00+00:00")
.unwrap()
.naive_utc(),
Utc,
),
timestamp: DateTime::parse_from_rfc3339("2017-12-30T01:00:00+00:00")
.unwrap()
.into(),
duration: Duration::seconds(0),
data: Map::new(),
};
println!("{event:?}");
client.insert_event(&bucketname, &event).unwrap();
// Ugly way to create a UTC from timestamp, see https://github.com/chronotope/chrono/issues/263
event.timestamp = DateTime::from_utc(
DateTime::parse_from_rfc3339("2017-12-30T01:00:01+00:00")
.unwrap()
.naive_utc(),
Utc,
);
event.timestamp = DateTime::parse_from_rfc3339("2017-12-30T01:00:01+00:00")
.unwrap()
.into();
client.heartbeat(&bucketname, &event, 10.0).unwrap();

let events = client.get_events(&bucketname, None, None, None).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion aw-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rocket = { version = "0.5.0", features = ["json"] }
rocket_cors = { version = "0.6.0" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
chrono = { version = "0.4", features = ["serde"] }
chrono = { version = "0.4.7", features = ["serde"] }
appdirs = "0.2.0"
lazy_static = "1.4"
log = "0.4"
Expand Down
Loading