Skip to content

Commit

Permalink
Added a test for the /groups endpoint in case we did not have one yet
Browse files Browse the repository at this point in the history
  • Loading branch information
EricWittmann committed Nov 6, 2024
1 parent 76401cb commit cfccf0c
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import io.apicurio.registry.AbstractResourceTestBase;
import io.apicurio.registry.model.GroupId;
import io.apicurio.registry.rest.client.models.CreateVersion;
import io.apicurio.registry.rest.client.models.GroupSearchResults;
import io.apicurio.registry.rest.v3.beans.ArtifactMetaData;
import io.apicurio.registry.rest.v3.beans.ArtifactReference;
import io.apicurio.registry.rest.v3.beans.Comment;
Expand Down Expand Up @@ -201,6 +202,10 @@ public void testMultipleGroups() throws Exception {
createArtifact(group2, "testMultipleGroups/EmptyAPI/2", ArtifactType.OPENAPI, jsonArtifactContent,
ContentTypes.APPLICATION_JSON);

// Get the list of groups - should have AT LEAST 2
GroupSearchResults results = clientV3.groups().get();
Assertions.assertTrue(results.getCount() >= 2);

// Get group 1 metadata
given().when().pathParam("groupId", group1).get("/registry/v3/groups/{groupId}").then()
.statusCode(200).body("groupId", equalTo("testMultipleGroups_1"));
Expand Down

0 comments on commit cfccf0c

Please sign in to comment.