blob: a8edda356149ef752b3881a35733b40c19d26140 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/testkit/testapp.h>
#include <vbench/test/all.h>
using namespace vbench;
TEST_FF("server tagger", RequestReceptor(), ServerTagger(ServerSpec("host", 42), f1)) {
Request::UP req(new Request());
EXPECT_EQUAL("", req->server().host);
EXPECT_EQUAL(0, req->server().port);
f2.handle(std::move(req));
ASSERT_TRUE(f1.request.get() != 0);
EXPECT_EQUAL("host", f1.request->server().host);
EXPECT_EQUAL(42, f1.request->server().port);
}
TEST_MAIN() { TEST_RUN_ALL(); }
|