use of org.cloudfoundry.credhub.helper.AuditingHelper in project credhub by cloudfoundry-incubator.
the class CredentialsControllerGetTest method beforeEach.
@Before
public void beforeEach() {
Consumer<Long> fakeTimeSetter = mockOutCurrentTimeProvider(mockCurrentTimeProvider);
fakeTimeSetter.accept(FROZEN_TIME.toEpochMilli());
mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).apply(springSecurity()).build();
auditingHelper = new AuditingHelper(requestAuditRecordRepository, eventAuditRecordRepository);
}
use of org.cloudfoundry.credhub.helper.AuditingHelper in project credhub by cloudfoundry-incubator.
the class CredentialsControllerTypeSpecificGenerateTest method setup.
@Before
public void setup() throws Exception {
String fakeSalt = cryptSaltFactory.generateSalt(FAKE_PASSWORD);
Consumer<Long> fakeTimeSetter = mockOutCurrentTimeProvider(mockCurrentTimeProvider);
fakeTimeSetter.accept(FROZEN_TIME.toEpochMilli());
mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).apply(springSecurity()).build();
when(passwordGenerator.generateCredential(any(GenerationParameters.class))).thenReturn(new StringCredentialValue(FAKE_PASSWORD));
when(certificateGenerator.generateCredential(any(GenerationParameters.class))).thenReturn(new CertificateCredentialValue(CA, CERTIFICATE, PRIVATE_KEY, null));
when(sshGenerator.generateCredential(any(GenerationParameters.class))).thenReturn(new SshCredentialValue(PUBLIC_KEY, PRIVATE_KEY, null));
when(rsaGenerator.generateCredential(any(GenerationParameters.class))).thenReturn(new RsaCredentialValue(PUBLIC_KEY, PRIVATE_KEY));
when(userGenerator.generateCredential(any(GenerationParameters.class))).thenReturn(new UserCredentialValue(USERNAME, FAKE_PASSWORD, fakeSalt));
auditingHelper = new AuditingHelper(requestAuditRecordRepository, eventAuditRecordRepository);
}
use of org.cloudfoundry.credhub.helper.AuditingHelper in project credhub by cloudfoundry-incubator.
the class InterpolationControllerTest method beforeEach.
@Before
public void beforeEach() {
mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).apply(springSecurity()).build();
auditingHelper = new AuditingHelper(requestAuditRecordRepository, eventAuditRecordRepository);
}
use of org.cloudfoundry.credhub.helper.AuditingHelper in project credhub by cloudfoundry-incubator.
the class CredentialSetErrorHandlingTest method setUp.
@Before
public void setUp() {
mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).apply(springSecurity()).build();
auditingHelper = new AuditingHelper(requestAuditRecordRepository, eventAuditRecordRepository);
}
use of org.cloudfoundry.credhub.helper.AuditingHelper in project credhub by cloudfoundry-incubator.
the class PermissionAndCredentialTest method setUp.
@Before
public void setUp() throws Exception {
auditingHelper = new AuditingHelper(requestAuditRecordRepository, eventAuditRecordRepository);
mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).apply(springSecurity()).build();
}
Aggregations