1
0
Fork 0

Merge branch 'devel' of ssh://github.com/ArangoDB/ArangoDB into devel

This commit is contained in:
Max Neunhoeffer 2016-06-09 13:52:41 +02:00
commit 174d620475
8 changed files with 37 additions and 57 deletions

View File

@ -46,7 +46,7 @@ Bottom=130
State=1
[Field 6]
Type=Text
Type=Password
Text=
Left=5
Right=60

View File

@ -808,7 +808,13 @@ Section "-Core installation"
!insertmacro MUI_STARTMENU_WRITE_END
System::Call 'Kernel32::SetEnvironmentVariable(t, t)i ("ARANGODB_DEFAULT_ROOT_PASSWORD", "$PASSWORD").r0'
StrCmp $0 0 error
ExecWait "$INSTDIR\bin\arangod.exe --database.init-database"
Goto done
error:
MessageBox MB_OK "Failed to initialize database password."
done:
@CPACK_NSIS_EXTRA_INSTALL_COMMANDS@
StrCmp $TRI_INSTALL_TYPE 'Service' 0 nothing
SimpleSC::StopService '${TRI_SVC_NAME}' 0 30

View File

@ -307,50 +307,5 @@ describe ArangoDB do
response["result"].should eq(true)
response["error"].should eq(false)
end
it "checks _system database restrictions" do
body = "{\"name\" : \"#{name}\" }"
doc = ArangoDB.log_post("#{prefix}-check-system", api, :body => body)
doc.code.should eq(201)
doc.headers['content-type'].should eq("application/json; charset=utf-8")
response = doc.parsed_response
response["result"].should eq(true)
response["error"].should eq(false)
# listing databases is disallowed in non-system
doc = ArangoDB.log_get("#{prefix}-check-system", "/_db/#{name}" + api)
doc.code.should eq(403)
response = doc.parsed_response
response["error"].should eq(true)
response["errorNum"].should eq(1230)
# retrieve information about _system database. this is still allowed
doc = ArangoDB.log_get("#{prefix}-check-system", "/_db/#{name}" + api + "/current")
doc.code.should eq(200)
result = doc.parsed_response["result"]
result["name"].should eq(name)
result["path"].should be_kind_of(String)
result["isSystem"].should eq(false)
# creating a new database is disallowed in non-system
body = "{\"name\" : \"UnitTestsWontWork\" }"
doc = ArangoDB.log_post("#{prefix}-check-system", "/_db/#{name}" + api, :body => body)
doc.code.should eq(403)
doc.headers['content-type'].should eq("application/json; charset=utf-8")
response = doc.parsed_response
response["error"].should eq(true)
response["errorNum"].should eq(1230)
# dropping the database is disallowed in non-system
doc = ArangoDB.log_delete("#{prefix}-check-system", "/_db/#{name}" + api + "/#{name}")
doc.code.should eq(403)
response = doc.parsed_response
response["error"].should eq(true)
response["errorNum"].should eq(1230)
end
end
end

View File

@ -251,19 +251,19 @@ JOB_STATUS MoveShard::status () {
Slice current = _snapshot(curPath).slice(),
plan = _snapshot(curPath).slice();
LOG(WARN) << plan.toJson();
LOG(WARN) << current.toJson();
std::vector<std::string> planv, currv;
for (auto const& srv : planv) {
planv.push_back(srv);
for (auto const& srv : VPackArrayIterator(plan)) {
planv.push_back(srv.copyString());
}
std::sort(planv.begin(), planv.end());
for (auto const& srv : currv) {
currv.push_back(srv);
for (auto const& srv : VPackArrayIterator(current)) {
currv.push_back(srv.copyString());
}
std::sort(currv.begin(), currv.end());
LOG(WARN) << planv;
LOG(WARN) << currv;
if (currv == planv) {
if (current[0].copyString() == std::string("_")+_from) { // Retired leader

View File

@ -153,7 +153,7 @@ HttpHandler::status_t RestAgencyHandler::handleWrite() {
} catch (std::exception const& e) {
LOG_TOPIC(WARN, Logger::AGENCY) << e.what();
}
std::this_thread::sleep_for(duration_t(1));
std::this_thread::sleep_for(duration_t(2));
if (max_index > 0) {
_agent->waitFor(max_index);
}

View File

@ -271,7 +271,7 @@ void Supervision::run() {
// make sense at all without other ArangoDB servers, we wait pretty
// long here before giving up:
if (!updateAgencyPrefix(1000, 1)) {
LOG_TOPIC(ERR, Logger::AGENCY)
LOG_TOPIC(DEBUG, Logger::AGENCY)
<< "Cannot get prefix from Agency. Stopping supervision for good.";
break;
}

View File

@ -2252,6 +2252,16 @@ testFuncs.authentication = function(options) {
};
}
if (options.cluster) {
print("skipping Authentication tests on cluster!");
return {
authentication: {
status: true,
skipped: true
}
};
}
print(CYAN + "Authentication tests..." + RESET);
let instanceInfo = startInstance("tcp", options, {
@ -2336,6 +2346,16 @@ testFuncs.authentication_parameters = function(options) {
};
}
if (options.cluster) {
print("skipping Authentication with parameters tests on cluster!");
return {
authentication: {
status: true,
skipped: true
}
};
}
print(CYAN + "Authentication with parameters tests..." + RESET);
let downloadOptions = {

View File

@ -355,7 +355,6 @@ function agencyTestSuite () {
leaderEndpoint = config.configuration.endpoints[config.leaderId].replace("tcp", "http");
break;
}
wait(0.05);
}
} else {
leaderEndpoint = agencyServers[0].replace("tcp", "http");