-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simple Server Upgrade Validation Test (#2231)
- Loading branch information
1 parent
eb5d1a8
commit e1ec611
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ServerUpgradeTest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package org.labkey.test.tests; | ||
|
||
import org.jetbrains.annotations.Nullable; | ||
import org.junit.Test; | ||
import org.junit.experimental.categories.Category; | ||
import org.labkey.test.BaseWebDriverTest; | ||
import org.labkey.test.Locator; | ||
import org.labkey.test.WebTestHelper; | ||
import org.labkey.test.categories.Git; | ||
import org.openqa.selenium.WebElement; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
@Category({Git.class}) | ||
public class ServerUpgradeTest extends BaseWebDriverTest | ||
{ | ||
|
||
@Test | ||
public void testErrorLog() | ||
{ | ||
String serverErrors = getServerErrors().trim(); | ||
|
||
checker().verifyTrue("There should be no server errors after upgrade. Found: " + serverErrors, | ||
serverErrors.isEmpty()); | ||
} | ||
|
||
@Test | ||
public void testMissingModules() | ||
{ | ||
beginAt(WebTestHelper.buildURL("admin", "modules")); | ||
List<WebElement> panels = Locator.tagWithClass("div", "panel-portal").findElements(getDriver()); | ||
|
||
String panelText = panels.get(1).getText(); | ||
checker().verifyTrue(String.format("It looks like there are unknown modules after upgrade: %s", panelText), | ||
panelText.contains("This server has no unknown modules.")); | ||
|
||
} | ||
|
||
@Nullable | ||
@Override | ||
protected String getProjectName() | ||
{ | ||
return "Server Upgrade Test"; | ||
} | ||
|
||
@Override | ||
public List<String> getAssociatedModules() | ||
{ | ||
return Collections.singletonList("Platform"); | ||
} | ||
|
||
} |