-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathUpgradeDBTest.cpp
More file actions
33 lines (26 loc) · 975 Bytes
/
UpgradeDBTest.cpp
File metadata and controls
33 lines (26 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <libstuff/SData.h>
#include <test/clustertest/BedrockClusterTester.h>
struct UpgradeDBTest : tpunit::TestFixture {
UpgradeDBTest()
: tpunit::TestFixture("UpgradeDB",
BEFORE_CLASS(UpgradeDBTest::setup),
AFTER_CLASS(UpgradeDBTest::teardown),
TEST(UpgradeDBTest::test)) { }
BedrockClusterTester* tester;
void setup() {
tester = new BedrockClusterTester();
}
void teardown() {
delete tester;
}
void test()
{
for (auto i : {0,1,2}) {
BedrockTester& brtester = tester->getTester(i);
// This just verifies that the dbupgrade table was created by TestPlugin.
SData query("Query");
query["Query"] = "INSERT INTO dbupgrade VALUES(" + SQ(1 + i) + ", " + SQ("val") + ");";
brtester.executeWaitVerifyContent(query, "200");
}
}
} __UpgradeDBTest;