Skip to content

Commit

Permalink
java-wildfly manifest test data and test cases under TestServeDevfile…
Browse files Browse the repository at this point in the history
…StarterProject added.

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
  • Loading branch information
michael-valdron committed Jul 29, 2022
1 parent b3c4891 commit 52d94f6
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion index/server/pkg/server/endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,24 @@ var (
},
},
},
"java-wildfly": {
"1.0.0": {
Versioned: specs.Versioned{SchemaVersion: 2},
Config: ocispec.Descriptor{
MediaType: devfileConfigMediaType,
},
Layers: []ocispec.Descriptor{
{
MediaType: devfileMediaType,
Digest: "sha256:a6363457f7603259b7c55c5d5752adcf1cfb146227e90890a3ca8aa6b71879dd",
Size: 7151,
Annotations: map[string]string{
"org.opencontainers.image.title": devfileName,
},
},
},
},
},
}
)

Expand Down Expand Up @@ -690,13 +708,29 @@ func TestServeDevfileStarterProject(t *testing.T) {
wantCode: http.StatusAccepted,
},
{
name: "GET /devfiles/java-quarkus/starter-projects/community - Fetch Go 'community' Starter Project",
name: "GET /devfiles/java-quarkus/starter-projects/community - Fetch Java Quarkus 'community' Starter Project",
params: gin.Params{
gin.Param{Key: "name", Value: "java-quarkus"},
gin.Param{Key: "starterProjectName", Value: "community"},
},
wantCode: http.StatusAccepted,
},
{
name: "GET /devfiles/java-wildfly/starter-projects/microprofile-config - Fetch Java Wildfly 'microprofile-config' Starter Project",
params: gin.Params{
gin.Param{Key: "name", Value: "java-wildfly"},
gin.Param{Key: "starterProjectName", Value: "microprofile-config"},
},
wantCode: http.StatusAccepted,
},
{
name: "GET /devfiles/java-wildfly/starter-projects/microprofile-jwt - Fetch Java Wildfly 'microprofile-jwt' Starter Project",
params: gin.Params{
gin.Param{Key: "name", Value: "java-wildfly"},
gin.Param{Key: "starterProjectName", Value: "microprofile-jwt"},
},
wantCode: http.StatusAccepted,
},
{
name: "GET /devfiles/not-exist/starter-projects/some - Fetch 'some' starter project from Non-Existent stack",
params: gin.Params{
Expand Down

0 comments on commit 52d94f6

Please sign in to comment.