Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] adding mysql 5.7 install in travis #2217

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .travis.install-mysql-5.7.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections
wget http://dev.mysql.com/get/mysql-apt-config_0.7.3-1_all.deb
sudo dpkg --install mysql-apt-config_0.7.3-1_all.deb
sudo apt-get update -q
sudo apt-get install -q -y -o Dpkg::Options::=--force-confnew mysql-server
sudo mysql_upgrade
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ php:
- "5.6"
- "7"

sudo: false
sudo: true

addons:
firefox: "44.0"
Expand Down Expand Up @@ -56,6 +56,8 @@ before_script:
- mkdir -p project smarty/templates_c
- chmod 777 smarty/templates_c

- bash .travis.install-mysql-5.7.sh

# Set up the MySQL database, install the Schema, create a MySQL user
# for the config file, and reset the Loris user's password for testing
- mysql -e 'CREATE DATABASE LorisTest'
Expand Down
8 changes: 4 additions & 4 deletions SQL/0000-00-00-schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1086,12 +1086,12 @@ CREATE TABLE `tarchive` (
`DicomArchiveID` varchar(255) NOT NULL default '',
`PatientID` varchar(255) NOT NULL default '',
`PatientName` varchar(255) NOT NULL default '',
`PatientDoB` date NOT NULL default '0000-00-00',
`PatientDoB` date default NULL,
`PatientGender` varchar(255) default NULL,
`neurodbCenterName` varchar(255) default NULL,
`CenterName` varchar(255) NOT NULL default '',
`LastUpdate` datetime NOT NULL default '0000-00-00 00:00:00',
`DateAcquired` date NOT NULL default '0000-00-00',
`LastUpdate` datetime default NULL,
`DateAcquired` date default NULL,
`DateFirstArchived` datetime default NULL,
`DateLastArchived` datetime default NULL,
`AcquisitionCount` int(11) NOT NULL default '0',
Expand Down Expand Up @@ -1311,7 +1311,7 @@ CREATE TABLE `users` (
`Active` enum('Y','N') NOT NULL default 'Y',
`Password_md5` varchar(34) default NULL,
`Password_hash` varchar(255) default NULL,
`Password_expiry` date NOT NULL default '0000-00-00',
`Password_expiry` date default NULL,
`Pending_approval` enum('Y','N') default 'Y',
`Doc_Repo_Notifications` enum('Y','N') default 'N',
PRIMARY KEY (`ID`),
Expand Down
1 change: 0 additions & 1 deletion modules/conflict_resolver/test/conflict_resolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ function setUp()
'OldValue1' => 'Mother',
'OldValue2' => 'Father',
'NewValue' => 'NULL',
'ConflictID' => 'NULL',
)
);
$this->DB->insert(
Expand Down
4 changes: 3 additions & 1 deletion modules/dashboard/test/DashboardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function setUp()
array(
'CenterID' => '55',
'Name' => 'TESTinPSC',
'Alias' => 'test',
'Alias' => 'tst',
'MRI_alias' => 'test',
)
);
Expand Down Expand Up @@ -111,6 +111,7 @@ function setUp()
"violations_resolved",
array(
'ExtID' => '1001',
'hash' => 'not null value',
'TypeTable' => 'mri_protocol_violated_scans',
'Resolved' => 'other',
)
Expand All @@ -119,6 +120,7 @@ function setUp()
"violations_resolved",
array(
'ExtID' => '1002',
'hash' => 'not null value',
'TypeTable' => 'MRICandidateErrors',
'Resolved' => 'unresolved',
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ class NDB_Form_data_team_helper extends NDB_Form
}

else{
$query = "SELECT COUNT(*), s.ID, s.visit_label, c.PSCID,s.candid, f.SessionID, f.test_name,f.data_entry,f.commentid, t.Full_name FROM session s
$query = "SELECT COUNT(*) FROM session s
JOIN flag f ON (f.sessionid = s.id)
JOIN candidate c ON (c.candid = s.candid)
JOIN test_names t ON (t.Test_name = f.Test_name)
Expand Down Expand Up @@ -459,7 +459,7 @@ class NDB_Form_data_team_helper extends NDB_Form
JOIN psc ON (s.CenterID = psc.CenterID) ";
}
else{
$query = "SELECT COUNT(*), s.ID, s.visit_label, c.PSCID,s.candid, f.SessionID, f.test_name,f.data_entry,f.commentid, t.Full_name FROM session s
$query = "SELECT COUNT(*) FROM session s
JOIN flag f ON (f.sessionid = s.id)
JOIN candidate c ON (c.candid = s.candid)
JOIN test_names t ON (t.Test_name = f.Test_name)
Expand Down
1 change: 1 addition & 0 deletions modules/dicom_archive/test/dicom_archiveTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ function setUp()
'SessionID' => '44',
'uploadAttempt' => '0',
'CreateInfo' => 'NULL',
'AcquisitionMetadata' => 'A really long text that can not be null.',
)
);
}
Expand Down
12 changes: 7 additions & 5 deletions modules/document_repository/test/document_repositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function setUp()
{
parent::setUp();
$window = new WebDriverWindow($this->webDriver);
$size = new WebDriverDimension(1024,1768);
$size = new WebDriverDimension(1024, 1768);
$window->setSize($size);
$this->DB->insert(
"document_repository_categories",
Expand All @@ -50,7 +50,6 @@ public function setUp()
'uploaded_by' => 'admin',
'For_site' => '3',
'comments' => 'tester',
'multipart' => 'NULL',
'EARLI' => '0',
'hide_video' => '0',
'File_category' => '9999999',
Expand Down Expand Up @@ -154,7 +153,8 @@ function testDocumentRepositoryCreateCategory()
$this->safeFindElement(WebDriverBy::Id("postCategory"))->click();
sleep(10);
$this->safeFindElement(
WebDriverBy::Xpath("//*[@id='TestTestTesta']/td/span"),3000
WebDriverBy::Xpath("//*[@id='TestTestTesta']/td/span"),
3000
)
->click();
$test = $this->safeFindElement(WebDriverBy::Id("testa"))
Expand All @@ -173,7 +173,8 @@ function testDocumentRepositoryUploadFile()
$this->markTestSkipped("This method isn't working properly on travis.");
$this->safeGet($this->url . "/document_repository/");
$this->safeFindElement(
WebDriverBy::Xpath("//*[@id='TESTTESTTESTTESTa']/td/span"),3000
WebDriverBy::Xpath("//*[@id='TESTTESTTESTTESTa']/td/span"),
3000
)
->click();
$test = $this->safeFindElement(WebDriverBy::linkText("README.md"))
Expand All @@ -187,7 +188,8 @@ function testDocumentRepositoryUploadFile()
* @return void
*/
function testDocumentRepositoryUploadFileEditDeleteComment()
{ $this->markTestSkipped("This method isn't working properly on travis.");
{
$this->markTestSkipped("This method isn't working properly on travis.");
$this->safeGet($this->url . "/document_repository/");
$this->safeFindElement(
WebDriverBy::Xpath("//*[@id='TESTTESTTESTTESTa']/td/span")
Expand Down
4 changes: 2 additions & 2 deletions modules/examiner/test/ExaminerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ public function setUp()
$this->DB->insert(
"psc",
array(
'CenterID' => '9999999',
'CenterID' => '99',
'Name' => 'TEST_Site',
'Study_site' => 'Y',
'StateID' => '0',
'Alias' => 'DDD',
'MRI_alias' => 'TESTTEST',
'MRI_alias' => 'TEST',
)
);
}
Expand Down
1 change: 0 additions & 1 deletion modules/help_editor/test/help_editorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ function setUp()
'topic' => 'Test Topic',
'content' => 'This is a test content.',
'created' => '2013-04-05 00:00:00',
'updated' => 'NULL',
)
);
}
Expand Down
6 changes: 3 additions & 3 deletions modules/imaging_browser/test/imaging_browserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public function setUp()
'QCStatus' => null,
'QCFirstChangeTime' => 1455040145,
'QCLastChangeTime' => 1455040145,
'Selected' => 't2'
'Selected' => true
)
);

Expand All @@ -258,7 +258,7 @@ public function setUp()
'QCStatus' => null,
'QCFirstChangeTime' => 1455040145,
'QCLastChangeTime' => 1455040145,
'Selected' => 't1'
'Selected' => true
)
);

Expand Down Expand Up @@ -1285,4 +1285,4 @@ function testImageCommentsWindowEditable()
$this->webDriver->switchTo()->window($diff[1])->close();
}
}
?>
?>
4 changes: 3 additions & 1 deletion modules/mri_violations/test/mri_violationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function setUp()
array(
'CenterID' => '55',
'Name' => 'TESTinPSC',
'Alias' => 'test',
'Alias' => 'tst',
'MRI_alias' => 'test'
)

Expand Down Expand Up @@ -84,6 +84,7 @@ public function setUp()
"violations_resolved",
array(
'ExtID' => '1001',
'hash' => 'not null value',
'TypeTable' => 'mri_protocol_violated_scans',
'Resolved' => 'other'
)
Expand All @@ -92,6 +93,7 @@ public function setUp()
"violations_resolved",
array(
'ExtID' => '1002',
'hash' => 'not null value',
'TypeTable' => 'MRICandidateErrors',
'Resolved' => 'unresolved'
)
Expand Down
16 changes: 8 additions & 8 deletions modules/new_profile/test/new_profileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ function testNewProfileDoBDateError() {
$this->webDriver->get($this->url . "/new_profile/");

$dates = $this->webDriver->findElements(WebDriverBy::cssSelector(".input-date"));
$dates[0]->sendKeys("01/01/2015");
$dates[1]->sendKeys("01/02/2015");
$dates[0]->sendKeys("2015-01-01");
$dates[1]->sendKeys("2015-02-01");
$this->webDriver->findElement(WebDriverBy::Xpath("//*[@id='footer']/div[1]"))
->click();
$gender = $this->webDriver->findElement(WebDriverBy::Name("gender"));
Expand Down Expand Up @@ -204,8 +204,8 @@ function testNewProfileCreateCandidate() {
$this->webDriver->get($this->url . "/new_profile/");

$dates = $this->webDriver->findElements(WebDriverBy::cssSelector(".input-date"));
$dates[0]->sendKeys("01/01/2015");
$dates[1]->sendKeys("01/01/2015");
$dates[0]->sendKeys("2015-01-01");
$dates[1]->sendKeys("2015-01-01");
$this->safeFindElement(WebDriverBy::Xpath("//*[@id='footer']/div[1]"))
->click();
sleep(1);
Expand Down Expand Up @@ -235,8 +235,8 @@ function testNewProfilePSCIDSequential() {
$this->webDriver->get($this->url . "/new_profile/");

$dates = $this->webDriver->findElements(WebDriverBy::cssSelector(".input-date"));
$dates[0]->sendKeys("01/01/2015");
$dates[1]->sendKeys("01/01/2015");
$dates[0]->sendKeys("2015-01-01");
$dates[1]->sendKeys("2015-01-01");
$this->webDriver->findElement(WebDriverBy::Xpath("//*[@id='footer']/div[1]"))
->click();
sleep(1);
Expand All @@ -254,8 +254,8 @@ function testNewProfilePSCIDSequential() {
$this->webDriver->get($this->url . "/new_profile/");

$dates = $this->webDriver->findElements(WebDriverBy::cssSelector(".input-date"));
$dates[0]->sendKeys("01/01/2015");
$dates[1]->sendKeys("01/01/2015");
$dates[0]->sendKeys("2015-01-01");
$dates[1]->sendKeys("2015-01-01");
$this->webDriver->findElement(WebDriverBy::Xpath("//*[@id='footer']/div[1]"))
->click();
sleep(1);
Expand Down
2 changes: 1 addition & 1 deletion modules/reliability/test/reliabilityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function setUp()
array(
'CenterID' => '55',
'Name' => 'TESTinPSC',
'Alias' => 'test',
'Alias' => 'tst',
'MRI_alias' => 'test'
)

Expand Down
2 changes: 1 addition & 1 deletion modules/statistics/php/NDB_Form_statistics.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ class NDB_Form_statistics extends NDB_Form
AND c.Active='Y'
$suproject_query
$Param_Project
GROUP BY s.CenterID, VLabel, f.Data_Entry ORDER BY c.PSCID;",
GROUP BY s.CenterID, VLabel, f.Data_Entry",
$this->params
);
foreach($result as $row) {
Expand Down
2 changes: 1 addition & 1 deletion modules/survey_accounts/test/survey_accountsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function setUp()
array(
'CenterID' => '55',
'Name' => 'TESTinPSC',
'Alias' => 'test',
'Alias' => 'tst',
'MRI_alias' => 'test'
)
);
Expand Down
Loading