Fixing tests so that when run on a CI within jetty itself,
This commit is contained in:
parent
80ffe47e7e
commit
3f172067c4
|
@ -34,8 +34,8 @@
|
|||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-test-helper</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -13,12 +13,13 @@
|
|||
|
||||
package org.eclipse.jetty.start;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -34,18 +35,13 @@ public class MainTest
|
|||
@Before
|
||||
public void setUp() throws Exception
|
||||
{
|
||||
System.setProperty("jetty.home",this.getClass().getResource("/jetty.home").getFile());
|
||||
File testJettyHome = MavenTestingUtils.getTestResourceDir("jetty.home");
|
||||
System.setProperty("jetty.home",testJettyHome.getAbsolutePath());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for {@link org.eclipse.jetty.start.StartIniParser#loadStartIni(java.lang.String)}.
|
||||
* @throws IOException
|
||||
*/
|
||||
@Test
|
||||
public void testLoadStartIni() throws IOException
|
||||
{
|
||||
URL startIni = this.getClass().getResource("/jetty.home/");
|
||||
System.setProperty("jetty.home",startIni.getFile());
|
||||
Main main = new Main();
|
||||
List<String> args = main.parseStartIniFiles();
|
||||
assertEquals("Expected 5 uncommented lines in start.ini",9,args.size());
|
||||
|
|
Loading…
Reference in New Issue