Skip to content

Commit

Permalink
Fix build with gcc 13 and fix expected test
Browse files Browse the repository at this point in the history
- Add missing headers
- Fix expected test
  • Loading branch information
bog-dan-ro committed Jan 20, 2024
1 parent 8254f85 commit 89c8611
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions include/dracon/plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#pragma once

#include <cstdint>
#include <functional>
#include <string>

Expand Down
1 change: 1 addition & 0 deletions include/dracon/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <condition_variable>
#include <cstring>
#include <list>
#include <stdexcept>
#include <string>
#include <string_view>
#include <thread>
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/test/test_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
*/

#include <dracon/http.h>
#include <dracon/logging.h>
#include <dracon/plugin.h>
#include <dracon/restful.h>
#include <dracon/logging.h>
#include <dracon/thread_worker.h>

#include <cassert>
Expand Down
6 changes: 5 additions & 1 deletion tests/server_tests/ResponseStatusErrorExceptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ TEST_P(ResponseStatusError, expectations100)
Getodac::Test::EasyCurl curl;
EXPECT_NO_THROW(curl.setUrl(url(GetParam(), "/testExpectation")));
curl.ingnoreInvalidSslCertificate();
curl.setHeaders({{"X-Continue", "100"}});
curl.setHeaders({
{"Expect", "100-continue"},
{"X-Continue", "100"}
});
auto reply = curl.post("some data");
EXPECT_EQ(reply.status, "200");
EXPECT_EQ(reply.body.size(), 0);
Expand All @@ -89,6 +92,7 @@ TEST_P(ResponseStatusError, expectations417)
Getodac::Test::EasyCurl curl;
EXPECT_NO_THROW(curl.setUrl(url(GetParam(), "/testExpectation")));
curl.ingnoreInvalidSslCertificate();
curl.setHeaders({{"Expect", "100-continue"}});
auto reply = curl.post("some data");
EXPECT_EQ(reply.status, "417");
EXPECT_EQ(reply.body.size(), 0);
Expand Down

0 comments on commit 89c8611

Please sign in to comment.