Skip to content

Commit

Permalink
feat(openapi): create app (#32)
Browse files Browse the repository at this point in the history
* feat(openapi): create app

* feat(openapi): create app

* fix: remove create app by env

* feat: support init admins when create app

* refactor: path "apps/create" -> "apps"

* test: move to IntegrationTest

* Update AppOpenApiServiceTest.java

* refactor: use OpenCreateAppDTO instead of OpenAppDTO

* test: testCreateAppThenCreateNamespaceThenRelease

* Update CHANGES.md

* add assignAppRoleToSelf to mark role permission

* testCreateAppButHaveNoAppRole

* refactor: use composite instead of extend OpenAppDTO

* Update OpenCreateAppDTO.java

* test: make test more complex. create the cluster too
  • Loading branch information
Anilople authored and nobodyiam committed Nov 3, 2023
1 parent 5344bc4 commit 21259e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.util.Arrays;
import java.util.Base64;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -60,7 +61,7 @@ public static OpenApiPathBuilder newBuilder() {

private OpenApiPathBuilder() {
this.pathVariable = new HashMap<>();
this.params = new HashMap<>();
this.params = new LinkedHashMap<>();
}

public OpenApiPathBuilder envPathVal(String env) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ public void testFindItemsByNamespace() throws Exception {

HttpGet get = request.getValue();

assertEquals(String.format("%s/envs/%s/apps/%s/clusters/%s/namespaces/%s/items?size=%s&page=%s",
someBaseUrl, someEnv, someAppId, someCluster, someNamespace, size, page), get.getURI().toString());
assertEquals(String.format("%s/envs/%s/apps/%s/clusters/%s/namespaces/%s/items?page=%s&size=%s",
someBaseUrl, someEnv, someAppId, someCluster, someNamespace, page, size), get.getURI().toString());
}

@Test(expected = RuntimeException.class)
Expand Down

0 comments on commit 21259e5

Please sign in to comment.