summaryrefslogtreecommitdiff
path: root/test/bbackupd
diff options
context:
space:
mode:
Diffstat (limited to 'test/bbackupd')
-rw-r--r--test/bbackupd/testbbackupd.cpp21
-rw-r--r--test/bbackupd/testfiles/bbackupd-temploc.conf1
-rw-r--r--test/bbackupd/testfiles/bbackupd.conf.in1
-rw-r--r--test/bbackupd/testfiles/bbstored.conf2
4 files changed, 10 insertions, 15 deletions
diff --git a/test/bbackupd/testbbackupd.cpp b/test/bbackupd/testbbackupd.cpp
index 27ca4ecb..3f165dc2 100644
--- a/test/bbackupd/testbbackupd.cpp
+++ b/test/bbackupd/testbbackupd.cpp
@@ -514,8 +514,7 @@ void do_interrupted_restore(const TLSContext &context, int64_t restoredirid)
{
// connect and log in
SocketStreamTLS conn;
- conn.Open(context, Socket::TypeINET, "localhost",
- 22011);
+ conn.Open(context, Socket::TypeINET, "localhost", BOX_PORT_BBSTORED);
BackupProtocolClient protocol(conn);
protocol.QueryVersion(BACKUP_STORE_SERVER_VERSION);
std::auto_ptr<BackupProtocolClientLoginConfirmed> loginConf(protocol.QueryLogin(0x01234567, BackupProtocolClientLogin::Flags_ReadOnly));
@@ -608,7 +607,7 @@ SocketStreamTLS sSocket;
std::auto_ptr<BackupProtocolClient> Connect(TLSContext& rContext)
{
sSocket.Open(rContext, Socket::TypeINET,
- "localhost", 22011);
+ "localhost", BOX_PORT_BBSTORED);
std::auto_ptr<BackupProtocolClient> connection;
connection.reset(new BackupProtocolClient(sSocket));
connection->Handshake();
@@ -2560,6 +2559,13 @@ int test_bbackupd()
true /* print progress dots */)
== Restore_TargetExists);
+ // Make sure you can't restore to a nonexistant path
+ printf("Try to restore to a path that doesn't exist\n");
+ TEST_THAT(BackupClientRestore(*client, restoredirid,
+ "testfiles/no-such-path/subdir",
+ true /* print progress dots */)
+ == Restore_TargetPathNotFound);
+
// Find ID of the deleted directory
deldirid = GetDirID(*client, "x1", restoredirid);
TEST_THAT(deldirid != 0);
@@ -2572,15 +2578,6 @@ int test_bbackupd()
true /* deleted files */)
== Restore_Complete);
- // Make sure you can't restore to a nonexistant path
- printf("\n\n==== Try to restore to a path "
- "that doesn't exist\n");
- fflush(stdout);
- TEST_THAT(BackupClientRestore(*client, restoredirid,
- "testfiles/no-such-path/subdir",
- true /* print progress dots */)
- == Restore_TargetPathNotFound);
-
// Log out
client->QueryFinished();
sSocket.Close();
diff --git a/test/bbackupd/testfiles/bbackupd-temploc.conf b/test/bbackupd/testfiles/bbackupd-temploc.conf
index 57d66bca..86901298 100644
--- a/test/bbackupd/testfiles/bbackupd-temploc.conf
+++ b/test/bbackupd/testfiles/bbackupd-temploc.conf
@@ -8,7 +8,6 @@ KeysFile = testfiles/bbackupd.keys
DataDirectory = testfiles/bbackupd-data
StoreHostname = localhost
-StorePort = 22011
AccountNumber = 0x01234567
UpdateStoreInterval = 3
diff --git a/test/bbackupd/testfiles/bbackupd.conf.in b/test/bbackupd/testfiles/bbackupd.conf.in
index 712b58b2..aecb3884 100644
--- a/test/bbackupd/testfiles/bbackupd.conf.in
+++ b/test/bbackupd/testfiles/bbackupd.conf.in
@@ -8,7 +8,6 @@ KeysFile = testfiles/bbackupd.keys
DataDirectory = testfiles/bbackupd-data
StoreHostname = localhost
-StorePort = 22011
AccountNumber = 0x01234567
UpdateStoreInterval = 3
diff --git a/test/bbackupd/testfiles/bbstored.conf b/test/bbackupd/testfiles/bbstored.conf
index 87f4fe6b..18c73a40 100644
--- a/test/bbackupd/testfiles/bbstored.conf
+++ b/test/bbackupd/testfiles/bbstored.conf
@@ -9,7 +9,7 @@ TimeBetweenHousekeeping = 5
Server
{
PidFile = testfiles/bbstored.pid
- ListenAddresses = inet:localhost:22011
+ ListenAddresses = inet:localhost
CertificateFile = testfiles/serverCerts.pem
PrivateKeyFile = testfiles/serverPrivKey.pem
TrustedCAsFile = testfiles/serverTrustedCAs.pem