From f0886ccbf4c097f0411c839f2d3761b2479572f6 Mon Sep 17 00:00:00 2001 From: Matthew Fioravante Date: Tue, 26 Oct 2021 22:36:10 -0400 Subject: [PATCH] Fix tests --- tst/EtcdSyncTest.cpp | 2 +- tst/EtcdTest.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tst/EtcdSyncTest.cpp b/tst/EtcdSyncTest.cpp index 0f77d4b..e2787c1 100644 --- a/tst/EtcdSyncTest.cpp +++ b/tst/EtcdSyncTest.cpp @@ -158,7 +158,7 @@ TEST_CASE("watch changes in the past") { etcd::SyncClient etcd(etcd_uri); - int index = etcd.set("/test/key1", "42").index(); + auto index = etcd.set("/test/key1", "42").index(); etcd.set("/test/key1", "43"); etcd.set("/test/key1", "44"); diff --git a/tst/EtcdTest.cpp b/tst/EtcdTest.cpp index 7e84f98..5810d51 100644 --- a/tst/EtcdTest.cpp +++ b/tst/EtcdTest.cpp @@ -375,13 +375,13 @@ TEST_CASE("watch changes in the past") { etcd::Client etcd("http://127.0.0.1:2379"); REQUIRE(0 == etcd.rmdir("/test", true).get().error_code()); - int index = etcd.set("/test/key1", "42").get().index(); + auto index = etcd.set("/test/key1", "42").get().index(); etcd.set("/test/key1", "43").wait(); etcd.set("/test/key1", "44").wait(); etcd.set("/test/key1", "45").wait(); - int head_index = etcd.head().get().index(); + auto head_index = etcd.head().get().index(); CHECK(index + 3 == head_index); etcd::Response res = etcd.watch("/test/key1", ++index).get();