summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/java/empty_war/empty.warbin0 -> 484 bytes
-rw-r--r--test/test_java_application.py40
2 files changed, 40 insertions, 0 deletions
diff --git a/test/java/empty_war/empty.war b/test/java/empty_war/empty.war
new file mode 100644
index 00000000..4985e804
--- /dev/null
+++ b/test/java/empty_war/empty.war
Binary files differ
diff --git a/test/test_java_application.py b/test/test_java_application.py
index 54ae3366..e62720d1 100644
--- a/test/test_java_application.py
+++ b/test/test_java_application.py
@@ -5,6 +5,46 @@ from unit.applications.lang.java import TestApplicationJava
class TestJavaApplication(TestApplicationJava):
prerequisites = ['java']
+ def test_java_conf_error(self):
+ self.skip_alerts.extend(
+ [
+ r'realpath.*failed',
+ r'failed to apply new conf',
+ ]
+ )
+ self.assertIn(
+ 'error',
+ self.conf(
+ {
+ "listeners": {"*:7080": {"pass": "applications/app"}},
+ "applications": {
+ "app": {
+ "type": "java",
+ "processes": 1,
+ "working_directory": self.current_dir
+ + "/java/empty",
+ "webapp": self.testdir + "/java",
+ }
+ },
+ }
+ ),
+ 'conf error',
+ )
+
+ def test_java_war(self):
+ self.load('empty_war')
+
+ self.assertIn(
+ 'success',
+ self.conf(
+ '"' + self.testdir + '/java/empty.war"',
+ '/config/applications/empty_war/webapp',
+ ),
+ 'configure war',
+ )
+
+ self.assertEqual(self.get()['status'], 200, 'war')
+
def test_java_application_cookies(self):
self.load('cookies')