Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Barenboim committed Mar 24, 2023
1 parent 9a2ebdb commit 891b31e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion test/facilities_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ TEST(facilities_unittest, async_request)
if (res.task_state == WFT_STATE_SUCCESS)
{
auto code = atoi(res.resp.get_status_code());
EXPECT_EQ(code, HttpStatusOK);
EXPECT_TRUE(code == HttpStatusOK ||
code == HttpStatusMovedPermanently ||
code == HttpStatusFound ||
code == HttpStatusSeeOther ||
code == HttpStatusTemporaryRedirect ||
code == HttpStatusPermanentRedirect);
}
}

Expand Down
7 changes: 6 additions & 1 deletion test/http_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ TEST(http_unittest, WFHttpTask2)
if (state == WFT_STATE_SUCCESS)
{
auto code = atoi(task->get_resp()->get_status_code());
EXPECT_EQ(code, HttpStatusOK);
EXPECT_TRUE(code == HttpStatusOK ||
code == HttpStatusMovedPermanently ||
code == HttpStatusFound ||
code == HttpStatusSeeOther ||
code == HttpStatusTemporaryRedirect ||
code == HttpStatusPermanentRedirect);
}

mutex.lock();
Expand Down

0 comments on commit 891b31e

Please sign in to comment.