ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/test/org/apache/catalina/startup/TestHostConfigAutomaticDeploymentModification.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/test/org/apache/catalina/startup/TestHostConfigAutomaticDeploymentModification.java
Status
scanned
Type
file
Name
TestHostConfigAutomaticDeploymentModification.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
6644 (6.5 KB)
MD5
9dca5382f7466462ca1ee9c6703ba12d
SHA1
b61b94d7cae669f92c0373c3ac99777893ace3ce
SHA256
413b9b4f89428f7840ab426ab825d289203cd83a8d6a3ef4287f1528e346fab1
SHA512

      
    
SHA1_git
f022c51ac8c3461ea6d24667fa5a8ac4caecbb51
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
TestHostConfigAutomaticDeploymentModification.java | 6.5 KB |

/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.catalina.startup; import org.junit.Test; import org.apache.catalina.LifecycleState; /** * The purpose of this class is to test the automatic deployment features of the * {@link HostConfig} implementation. */ public class TestHostConfigAutomaticDeploymentModification extends HostConfigAutomaticDeploymentBaseTest { /* * Expected behaviour for modification of files. * * Artifacts present Artifact Artifacts remaining * XML WAR EXT DIR Modified XML WAR EXT DIR Action * N N N Y DIR - - - M None * N Y N N WAR - M - - Redeploy * N Y N Y DIR - Y - M None * N Y N Y WAR - M - R Redeploy * Y N N N XML M - - - Redeploy * Y N N Y DIR Y - - M None * Y N N Y XML M - - Y Redeploy * Y N Y N EXT Y - M - Reload if WAR * Y N Y N XML M - Y - Redeploy * Y N Y Y DIR Y - Y M None * Y N Y Y EXT Y - M R Reload * Y N Y Y XML M - Y Y Redeploy * Y Y N N WAR Y M - - Reload * Y Y N N XML M Y - - Redeploy * Y Y N Y DIR Y Y - M None * Y Y N Y WAR Y M - - Reload * Y Y N Y XML M Y - Y Redeploy */ @Test public void testModifyDirUpdateDir() throws Exception { doTestModify(false, false, false, false, true, DIR, false, false, true, DIR_COOKIE_NAME, NONE); } @Test public void testModifyWarUpdateWar() throws Exception { doTestModify(false, false, false, true, false, WAR, false, true, false, WAR_COOKIE_NAME, REDEPLOY); } @Test public void testModifyWarDirUpdateDir() throws Exception { // DIR_COOKIE_NAME since Tomcat is going to assume DIR is expanded WAR doTestModify(false, false, false, true, true, DIR, false, true, true, DIR_COOKIE_NAME, NONE); } @Test public void testModifyWarDirUpdateWar() throws Exception { doTestModify(false, false, false, true, true, WAR, false, true, true, WAR_COOKIE_NAME, REDEPLOY); } @Test public void testModifyXmlUpdateXml() throws Exception { doTestModify(true, false, false, false, false, XML, true, false, false, XML_COOKIE_NAME, REDEPLOY, LifecycleState.FAILED); } @Test public void testModifyXmlDirUpdateDir() throws Exception { doTestModify(true, false, false, false, true, DIR, true, false, true, XML_COOKIE_NAME, NONE); } @Test public void testModifyXmlDirUpdateXml() throws Exception { doTestModify(true, false, false, false, true, XML, true, false, true, XML_COOKIE_NAME, REDEPLOY); } @Test public void testModifyXmlExtwarUpdateExtwar() throws Exception { doTestModify(true, true, false, false, false, EXT, true, false, false, XML_COOKIE_NAME, RELOAD); } @Test public void testModifyXmlExtdirUpdateExtdir() throws Exception { doTestModify(true, false, true, false, false, EXT, true, false, false, XML_COOKIE_NAME, NONE); } @Test public void testModifyXmlExtwarUpdateXml() throws Exception { doTestModify(true, true, false, false, false, XML, true, false, false, XML_COOKIE_NAME, REDEPLOY); } @Test public void testModifyXmlExtdirUpdateXml() throws Exception { doTestModify(true, false, true, false, false, XML, true, false, false, XML_COOKIE_NAME, REDEPLOY); } @Test public void testModifyXmlExtwarDirUpdateDir() throws Exception { doTestModify(true, true, false, false, true, DIR, true, false, false, XML_COOKIE_NAME, NONE); } @Test public void testModifyXmlExtwarDirUpdateExt() throws Exception { doTestModify(true, true, false, false, true, EXT, true, false, true, XML_COOKIE_NAME, RELOAD); } @Test public void testModifyXmlExtwarDirUpdateXml() throws Exception { doTestModify(true, true, false, false, true, XML, true, false, false, XML_COOKIE_NAME, REDEPLOY); } @Test public void testModifyXmlWarUpdateWar() throws Exception { doTestModify(true, false, false, true, false, WAR, true, true, false, XML_COOKIE_NAME, RELOAD); } @Test public void testModifyXmlWarUpdateXml() throws Exception { doTestModify(true, false, false, true, false, XML, true, true, false, XML_COOKIE_NAME, REDEPLOY); } @Test public void testModifyXmlWarDirUpdateDir() throws Exception { doTestModify(true, false, false, true, true, DIR, true, true, true, XML_COOKIE_NAME, NONE); } @Test public void testModifyXmlWarDirUpdateWar() throws Exception { doTestModify(true, false, false, true, true, WAR, true, true, true, XML_COOKIE_NAME, RELOAD); } @Test public void testModifyXmlWarDirUpdateXml() throws Exception { doTestModify(true, false, false, true, true, XML, true, true, true, XML_COOKIE_NAME, REDEPLOY); } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
16.78
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 9 9