-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Add a ut
1 parent
c3badfb
commit 5c10781
Showing
6 changed files
with
29 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
library/src/ipfs_client/gw/multi_gateway_requestor_unittest.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "multi_gateway_requestor.h" | ||
|
||
#include <mock_api.h> | ||
|
||
#include <ipfs_client/gw/gateway_request.h> | ||
|
||
namespace { | ||
ig::RequestPtr block_req() { | ||
auto rv = std::make_shared<ig::GatewayRequest>(); | ||
rv->type = ig::Type::Block; | ||
rv->main_param = | ||
"bafybeid4dzlxm6h4r6kfvx6jp6vj4nteplmbve224lx2s3lgjubyufsuo4"; | ||
return rv; | ||
} | ||
} // namespace | ||
|
||
TEST(MultiGatewayRequestor, FailsWithoutApi) { | ||
ig::MultiGatewayRequestor t; | ||
auto o = t.handle(block_req()); | ||
EXPECT_TRUE(o == ig::Requestor::HandleOutcome::DONE); | ||
} |
2 changes: 0 additions & 2 deletions
2
test_data/blocks/QmU9HH6fsfUiy7isXZ8J6YEkkw3M1u11rD7TxjyY35keF1
This file was deleted.
Oops, something went wrong.
Binary file not shown.
1 change: 0 additions & 1 deletion
1
test_data/blocks/bafkreibthyfb4j4blugo5zk4i476hxet2vwghy564kz3jlxi53lnoamrum
This file was deleted.
Oops, something went wrong.