Add running tests
This commit is contained in:
parent
cd31ec8a20
commit
1c2adb1a92
3 changed files with 15 additions and 8 deletions
|
|
@ -3,8 +3,8 @@ on:
|
||||||
push:
|
push:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ansible-lint:
|
test:
|
||||||
name: Verify
|
name: Test
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v7
|
||||||
|
|
@ -12,6 +12,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
apt update
|
apt update
|
||||||
apt install -y maven
|
apt install -y maven
|
||||||
- name: Run maven verify
|
- name: Run maven verify test
|
||||||
run: |
|
run: |
|
||||||
mvn -f attribute-endpoints-provider verify
|
mvn -f attribute-endpoints-provider verify test
|
||||||
6
Makefile
6
Makefile
|
|
@ -1,6 +1,12 @@
|
||||||
|
install:
|
||||||
|
mvn -f attribute-endpoints-provider install
|
||||||
|
|
||||||
verify:
|
verify:
|
||||||
mvn -f attribute-endpoints-provider verify
|
mvn -f attribute-endpoints-provider verify
|
||||||
|
|
||||||
|
test:
|
||||||
|
mvn -f attribute-endpoints-provider test
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
mvn -f attribute-endpoints-provider clean
|
mvn -f attribute-endpoints-provider clean
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -106,11 +106,12 @@ public class AttributeEndpointsResourceProviderTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void exportAttributeValues_doorisSlug_returnsSshKeysOfMatchingUser() {
|
public void exportAttributeValues_doorisSlug_returnsSshKeysOfMatchingUser() {
|
||||||
Response response = callAuthenticatedAs("export-dooris-ssh-keys",
|
try (Response response = callAuthenticatedAs("export-dooris-ssh-keys",
|
||||||
() -> new AttributeEndpointsResourceProvider(session).exportAttributeValues("dooris-ssh-keys"));
|
() -> new AttributeEndpointsResourceProvider(session).exportAttributeValues("dooris-ssh-keys"))) {
|
||||||
|
|
||||||
assertEquals(200, response.getStatus());
|
assertEquals(200, response.getStatus());
|
||||||
assertEquals(List.of("hacker-ssh-key-1", "hacker-ssh-key-2"), response.getEntity());
|
assertEquals(List.of("hacker-ssh-key-1", "hacker-ssh-key-2"), response.getEntity());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue