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

Function TestHttpOnlyJavaSourceRest2

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

Source from the content-addressed store, hash-verified

97}
98
99func TestHttpOnlyJavaSourceRest2(t *testing.T) {
100 code := v1.SourceSpec{
101 DataSpec: v1.DataSpec{
102 Name: "Request.java",
103 Content: `
104 from("seda:bots/cippa").to("log:stash");
105 rest( ).get("").to("log:stash");
106 `,
107 },
108 Language: v1.LanguageJavaSource,
109 }
110
111 catalog, err := camel.DefaultCatalog()
112 require.NoError(t, err)
113
114 meta, err := extract(catalog, code)
115 require.NoError(t, err)
116
117 assert.True(t, meta.ExposesHTTPServices)
118 assert.True(t, meta.PassiveEndpoints)
119}
120
121func TestHttpXMLSource(t *testing.T) {
122 code := v1.SourceSpec{

Callers

nothing calls this directly

Calls 2

DefaultCatalogFunction · 0.92
extractFunction · 0.85

Tested by

no test coverage detected