use of org.sonatype.nexus.repository.rest.api.model.AbstractRepositoryApiRequest in project nexus-repository-r by sonatype-nexus-community.
the class RResourceIT method updateHosted_noAuthz.
@Test
public void updateHosted_noAuthz() throws Exception {
repos.createRHosted(HOSTED_NAME);
setUnauthorizedUser();
AbstractRepositoryApiRequest request = createHostedRequest(false);
Response response = put(getUpdateRepositoryPathUrl(HostedType.NAME, HOSTED_NAME), request);
assertEquals(Status.FORBIDDEN.getStatusCode(), response.getStatus());
}
use of org.sonatype.nexus.repository.rest.api.model.AbstractRepositoryApiRequest in project nexus-repository-r by sonatype-nexus-community.
the class RResourceIT method createProxy_noAuthz.
@Test
public void createProxy_noAuthz() throws Exception {
setUnauthorizedUser();
AbstractRepositoryApiRequest request = createProxyRequest(true);
Response response = post(getCreateRepositoryPathUrl(ProxyType.NAME), request);
assertEquals(Status.FORBIDDEN.getStatusCode(), response.getStatus());
}
use of org.sonatype.nexus.repository.rest.api.model.AbstractRepositoryApiRequest in project nexus-repository-r by sonatype-nexus-community.
the class RResourceIT method createGroup.
@Test
public void createGroup() throws Exception {
AbstractRepositoryApiRequest request = createGroupRequest(true);
Response response = post(getCreateRepositoryPathUrl(GroupType.NAME), request);
assertEquals(Status.CREATED.getStatusCode(), response.getStatus());
repositoryManager.delete(request.getName());
}
use of org.sonatype.nexus.repository.rest.api.model.AbstractRepositoryApiRequest in project nexus-repository-r by sonatype-nexus-community.
the class RResourceIT method createProxy_noAuthc.
@Test
public void createProxy_noAuthc() throws Exception {
setBadCredentials();
AbstractRepositoryApiRequest request = createProxyRequest(true);
Response response = post(getCreateRepositoryPathUrl(ProxyType.NAME), request);
assertEquals(Status.UNAUTHORIZED.getStatusCode(), response.getStatus());
}
use of org.sonatype.nexus.repository.rest.api.model.AbstractRepositoryApiRequest in project nexus-repository-r by sonatype-nexus-community.
the class RResourceIT method createHosted_noAuthz.
@Test
public void createHosted_noAuthz() throws Exception {
setUnauthorizedUser();
AbstractRepositoryApiRequest request = createHostedRequest(true);
Response response = post(getCreateRepositoryPathUrl(HostedType.NAME), request);
assertEquals(Status.FORBIDDEN.getStatusCode(), response.getStatus());
}
Aggregations