MCPcopy Create free account
hub / github.com/apache/camel-k / TestHttpOnlyJavaSourceRest

Function TestHttpOnlyJavaSourceRest

pkg/metadata/metadata_http_test.go:77–97  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

75}
76
77func TestHttpOnlyJavaSourceRest(t *testing.T) {
78 code := v1.SourceSpec{
79 DataSpec: v1.DataSpec{
80 Name: "Request.java",
81 Content: `
82 from("direct:bots/cippa").to("log:stash");
83 rest().get("").to("log:stash");
84 `,
85 },
86 Language: v1.LanguageJavaSource,
87 }
88
89 catalog, err := camel.DefaultCatalog()
90 require.NoError(t, err)
91
92 meta, err := extract(catalog, code)
93 require.NoError(t, err)
94
95 assert.True(t, meta.ExposesHTTPServices)
96 assert.True(t, meta.PassiveEndpoints)
97}
98
99func TestHttpOnlyJavaSourceRest2(t *testing.T) {
100 code := v1.SourceSpec{

Callers

nothing calls this directly

Calls 2

DefaultCatalogFunction · 0.92
extractFunction · 0.85

Tested by

no test coverage detected