(name string)
| 70 | } |
| 71 | |
| 72 | func createTestFunction(name string) *model.Function { |
| 73 | return &model.Function{ |
| 74 | Runtime: model.RuntimeConfig{ |
| 75 | Type: common.WASMRuntime, |
| 76 | Config: map[string]interface{}{ |
| 77 | common.RuntimeArchiveConfigKey: "../bin/example_basic.wasm", |
| 78 | }, |
| 79 | }, |
| 80 | Sources: []model.TubeConfig{ |
| 81 | { |
| 82 | Type: common.MemoryTubeType, |
| 83 | Config: (&contube.SourceQueueConfig{ |
| 84 | Topics: []string{"input"}, |
| 85 | SubName: "test", |
| 86 | }).ToConfigMap(), |
| 87 | }, |
| 88 | }, |
| 89 | Sink: model.TubeConfig{ |
| 90 | Type: common.MemoryTubeType, |
| 91 | Config: (&contube.SinkQueueConfig{ |
| 92 | Topic: "output", |
| 93 | }).ToConfigMap(), |
| 94 | }, |
| 95 | Name: name, |
| 96 | Replicas: 1, |
| 97 | Config: map[string]string{}, |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | const yamlSeparator string = "---\n" |
| 102 |
no test coverage detected