Search in sources :

Example 6 with TrustedUserPrincipal

use of org.candlepin.auth.TrustedUserPrincipal in project candlepin by candlepin.

the class ConsumerResourceCreationTest method registerWithNullReleaseVer.

@Test
public void registerWithNullReleaseVer() {
    Principal p = new TrustedUserPrincipal("anyuser");
    ConsumerDTO consumer = TestUtil.createConsumerDTO("consumername", null, null, systemDto);
    consumer.setReleaseVersion(null);
    resource.create(consumer, p, USER, owner.getKey(), null, true);
}
Also used : TrustedUserPrincipal(org.candlepin.auth.TrustedUserPrincipal) ConsumerDTO(org.candlepin.dto.api.v1.ConsumerDTO) TrustedUserPrincipal(org.candlepin.auth.TrustedUserPrincipal) UserPrincipal(org.candlepin.auth.UserPrincipal) Principal(org.candlepin.auth.Principal) NoAuthPrincipal(org.candlepin.auth.NoAuthPrincipal) Test(org.junit.Test)

Aggregations

NoAuthPrincipal (org.candlepin.auth.NoAuthPrincipal)6 Principal (org.candlepin.auth.Principal)6 TrustedUserPrincipal (org.candlepin.auth.TrustedUserPrincipal)6 UserPrincipal (org.candlepin.auth.UserPrincipal)6 ConsumerDTO (org.candlepin.dto.api.v1.ConsumerDTO)6 Test (org.junit.Test)6 Date (java.util.Date)1 Consumer (org.candlepin.model.Consumer)1