Add running tests
All checks were successful
/ Test (push) Successful in 52s
/ Test (pull_request) Successful in 54s

This commit is contained in:
Stefan Bethke 2026-07-18 18:26:19 +02:00
commit 1c2adb1a92
3 changed files with 15 additions and 8 deletions

View file

@ -3,8 +3,8 @@ on:
push:
jobs:
ansible-lint:
name: Verify
test:
name: Test
runs-on: docker
steps:
- uses: actions/checkout@v7
@ -12,6 +12,6 @@ jobs:
run: |
apt update
apt install -y maven
- name: Run maven verify
- name: Run maven verify test
run: |
mvn -f attribute-endpoints-provider verify
mvn -f attribute-endpoints-provider verify test

View file

@ -1,6 +1,12 @@
install:
mvn -f attribute-endpoints-provider install
verify:
mvn -f attribute-endpoints-provider verify
test:
mvn -f attribute-endpoints-provider test
clean:
mvn -f attribute-endpoints-provider clean

View file

@ -106,11 +106,12 @@ public class AttributeEndpointsResourceProviderTest {
@Test
public void exportAttributeValues_doorisSlug_returnsSshKeysOfMatchingUser() {
Response response = callAuthenticatedAs("export-dooris-ssh-keys",
() -> new AttributeEndpointsResourceProvider(session).exportAttributeValues("dooris-ssh-keys"));
try (Response response = callAuthenticatedAs("export-dooris-ssh-keys",
() -> new AttributeEndpointsResourceProvider(session).exportAttributeValues("dooris-ssh-keys"))) {
assertEquals(200, response.getStatus());
assertEquals(List.of("hacker-ssh-key-1", "hacker-ssh-key-2"), response.getEntity());
assertEquals(200, response.getStatus());
assertEquals(List.of("hacker-ssh-key-1", "hacker-ssh-key-2"), response.getEntity());
}
}
@Test