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

Function TestHttpJavaSource

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

Source from the content-addressed store, hash-verified

28)
29
30func TestHttpJavaSource(t *testing.T) {
31 code := v1.SourceSpec{
32 DataSpec: v1.DataSpec{
33 Name: "Request.java",
34 Content: `
35 from("telegram:bots/cippa").to("log:stash");
36 from("netty-http:uri").to("log:stash");
37 `,
38 },
39 Language: v1.LanguageJavaSource,
40 }
41
42 catalog, err := camel.DefaultCatalog()
43 require.NoError(t, err)
44
45 meta, err := extract(catalog, code)
46 require.NoError(t, err)
47
48 assert.True(t, meta.ExposesHTTPServices)
49 assert.False(t, meta.PassiveEndpoints)
50}
51
52func TestHttpOnlyJavaSource(t *testing.T) {
53 code := v1.SourceSpec{

Callers

nothing calls this directly

Calls 2

DefaultCatalogFunction · 0.92
extractFunction · 0.85

Tested by

no test coverage detected