mirror of https://github.com/apache/archiva.git
fix some unit tests initializationError
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1132596 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8ad78e8f02
commit
532dd24896
|
@ -95,7 +95,7 @@ public class DavResourceTest
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
protected void tearDown()
|
public void tearDown()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
super.tearDown();
|
super.tearDown();
|
||||||
|
|
|
@ -32,6 +32,7 @@ import org.apache.maven.archiva.model.ArchivaRepositoryMetadata;
|
||||||
import org.apache.maven.archiva.repository.metadata.RepositoryMetadataReader;
|
import org.apache.maven.archiva.repository.metadata.RepositoryMetadataReader;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -139,6 +140,7 @@ public class RepositoryServletRepositoryGroupTest
|
||||||
/*
|
/*
|
||||||
* Test Case 3.c
|
* Test Case 3.c
|
||||||
*/
|
*/
|
||||||
|
@Test
|
||||||
public void testGetFromFirstManagedRepositoryReturnOk()
|
public void testGetFromFirstManagedRepositoryReturnOk()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
@ -159,6 +161,7 @@ public class RepositoryServletRepositoryGroupTest
|
||||||
/*
|
/*
|
||||||
* Test Case 3.c
|
* Test Case 3.c
|
||||||
*/
|
*/
|
||||||
|
@Test
|
||||||
public void testGetFromLastManagedRepositoryReturnOk()
|
public void testGetFromLastManagedRepositoryReturnOk()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
@ -179,6 +182,7 @@ public class RepositoryServletRepositoryGroupTest
|
||||||
/*
|
/*
|
||||||
* Test Case 3.b
|
* Test Case 3.b
|
||||||
*/
|
*/
|
||||||
|
@Test
|
||||||
public void testGetFromValidRepositoryGroupReturnNotFound()
|
public void testGetFromValidRepositoryGroupReturnNotFound()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
@ -194,6 +198,7 @@ public class RepositoryServletRepositoryGroupTest
|
||||||
/*
|
/*
|
||||||
* Test Case 3.a
|
* Test Case 3.a
|
||||||
*/
|
*/
|
||||||
|
@Test
|
||||||
public void testGetInvalidManagedRepositoryInGroupReturnNotFound()
|
public void testGetInvalidManagedRepositoryInGroupReturnNotFound()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
@ -209,6 +214,7 @@ public class RepositoryServletRepositoryGroupTest
|
||||||
/*
|
/*
|
||||||
* Test Case 4
|
* Test Case 4
|
||||||
*/
|
*/
|
||||||
|
@Test
|
||||||
public void testPutValidRepositoryGroupReturnBadRequest()
|
public void testPutValidRepositoryGroupReturnBadRequest()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
@ -223,6 +229,7 @@ public class RepositoryServletRepositoryGroupTest
|
||||||
}
|
}
|
||||||
|
|
||||||
// MRM-872
|
// MRM-872
|
||||||
|
@Test
|
||||||
public void testGetMergedMetadata()
|
public void testGetMergedMetadata()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
@ -292,6 +299,7 @@ public class RepositoryServletRepositoryGroupTest
|
||||||
}
|
}
|
||||||
|
|
||||||
// MRM-901
|
// MRM-901
|
||||||
|
@Test
|
||||||
public void testBrowseWithTwoArtifactsWithSameGroupIdInRepos()
|
public void testBrowseWithTwoArtifactsWithSameGroupIdInRepos()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,6 +50,7 @@ import org.easymock.MockControl;
|
||||||
import org.easymock.classextension.MockClassControl;
|
import org.easymock.classextension.MockClassControl;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||||
|
@ -166,7 +167,7 @@ public class RepositoryServletSecurityTest
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@After
|
@After
|
||||||
protected void tearDown()
|
public void tearDown()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
if ( sc != null )
|
if ( sc != null )
|
||||||
|
@ -191,6 +192,7 @@ public class RepositoryServletSecurityTest
|
||||||
|
|
||||||
// test deploy with invalid user, and guest has no write access to repo
|
// test deploy with invalid user, and guest has no write access to repo
|
||||||
// 401 must be returned
|
// 401 must be returned
|
||||||
|
@Test
|
||||||
public void testPutWithInvalidUserAndGuestHasNoWriteAccess()
|
public void testPutWithInvalidUserAndGuestHasNoWriteAccess()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
@ -226,6 +228,7 @@ public class RepositoryServletSecurityTest
|
||||||
}
|
}
|
||||||
|
|
||||||
// test deploy with invalid user, but guest has write access to repo
|
// test deploy with invalid user, but guest has write access to repo
|
||||||
|
@Test
|
||||||
public void testPutWithInvalidUserAndGuestHasWriteAccess()
|
public void testPutWithInvalidUserAndGuestHasWriteAccess()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
@ -282,6 +285,7 @@ public class RepositoryServletSecurityTest
|
||||||
}
|
}
|
||||||
|
|
||||||
// test deploy with a valid user with no write access
|
// test deploy with a valid user with no write access
|
||||||
|
@Test
|
||||||
public void testPutWithValidUserWithNoWriteAccess()
|
public void testPutWithValidUserWithNoWriteAccess()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
@ -329,6 +333,7 @@ public class RepositoryServletSecurityTest
|
||||||
}
|
}
|
||||||
|
|
||||||
// test deploy with a valid user with write access
|
// test deploy with a valid user with write access
|
||||||
|
@Test
|
||||||
public void testPutWithValidUserWithWriteAccess()
|
public void testPutWithValidUserWithWriteAccess()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
@ -385,6 +390,7 @@ public class RepositoryServletSecurityTest
|
||||||
}
|
}
|
||||||
|
|
||||||
// test get with invalid user, and guest has read access to repo
|
// test get with invalid user, and guest has read access to repo
|
||||||
|
@Test
|
||||||
public void testGetWithInvalidUserAndGuestHasReadAccess()
|
public void testGetWithInvalidUserAndGuestHasReadAccess()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
@ -440,6 +446,7 @@ public class RepositoryServletSecurityTest
|
||||||
}
|
}
|
||||||
|
|
||||||
// test get with invalid user, and guest has no read access to repo
|
// test get with invalid user, and guest has no read access to repo
|
||||||
|
@Test
|
||||||
public void testGetWithInvalidUserAndGuestHasNoReadAccess()
|
public void testGetWithInvalidUserAndGuestHasNoReadAccess()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
@ -477,6 +484,7 @@ public class RepositoryServletSecurityTest
|
||||||
}
|
}
|
||||||
|
|
||||||
// test get with valid user with read access to repo
|
// test get with valid user with read access to repo
|
||||||
|
@Test
|
||||||
public void testGetWithAValidUserWithReadAccess()
|
public void testGetWithAValidUserWithReadAccess()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
@ -527,6 +535,7 @@ public class RepositoryServletSecurityTest
|
||||||
}
|
}
|
||||||
|
|
||||||
// test get with valid user with no read access to repo
|
// test get with valid user with no read access to repo
|
||||||
|
@Test
|
||||||
public void testGetWithAValidUserWithNoReadAccess()
|
public void testGetWithAValidUserWithNoReadAccess()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue