Skip to content

Commit

Permalink
Merge pull request #38 from netceteragroup/enable-health-test
Browse files Browse the repository at this point in the history
[22] Re-enable health test
  • Loading branch information
MarijaPopova authored Mar 3, 2023
2 parents 7b9e730 + eb06f22 commit e5b4618
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 2 deletions.
6 changes: 6 additions & 0 deletions girders-demos/girders-demo-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>

<dependency>
<groupId>com.unboundid</groupId>
<artifactId>unboundid-ldapsdk</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.fasterxml.jackson.databind.JsonNode;
import com.netcetera.girders.demo.test.TestConfiguration;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -11,6 +10,7 @@
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.test.web.server.LocalServerPort;
import org.springframework.context.annotation.Import;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.web.client.RestTemplate;

Expand All @@ -25,6 +25,7 @@
properties = "girders.crypto.text=disabled")
@Import(TestConfiguration.class)
@ExtendWith(SpringExtension.class)
@ActiveProfiles("health-test")
class HealthTest {

@Autowired
Expand All @@ -35,7 +36,6 @@ class HealthTest {
private int port;

@Test
@Disabled
void testHealth() {
String url = "http://localhost:" + port + "/demo-showcase/actuator/health";
JsonNode result = client.getForObject(url, JsonNode.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
spring.ldap:
urls: ldap://localhost:8389
base: dc=netcetera,dc=com
username: uid=admin
password: secret

spring.ldap.embedded:
ldif: classpath:ldap-test.ldif
base-dn: ${spring.ldap.base}
port: 8389
credential.username: uid=admin
credential.password: secret
validation.enabled: false
30 changes: 30 additions & 0 deletions girders-demos/girders-demo-test/src/test/resources/ldap-test.ldif
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
dn: dc=netcetera,dc=com
objectclass: top
objectclass: domain
objectclass: extensibleObject
dc: netcetera

# Organizational Units
dn: ou=people,dc=netcetera,dc=com
objectclass: top
objectclass: organizationalUnit
ou: people

# Create People
dn: uid=shelby,ou=people,dc=netcetera,dc=com
objectclass: top
objectclass: account
cn: Thomas
sn: Shelby
uid: shelby
mail: thomas.shelby@sth.com
employeeType: ncg-employee

dn: uid=john,ou=people,dc=netcetera,dc=com
objectclass: top
objectclass: account
cn: John
sn: Smith
uid: john
mail: john.smith@sth.com
employeeType: ncg-employee

0 comments on commit e5b4618

Please sign in to comment.