commit | adb1b2d871292bd87b5652d0f0b04aa85ee39394 | [log] [tgz] |
---|---|---|
author | Tzu-Li (Gordon) Tai <tzulitai@apache.org> | Wed Mar 04 19:58:43 2020 +0800 |
committer | Tzu-Li (Gordon) Tai <tzulitai@apache.org> | Fri Mar 06 09:36:54 2020 +0800 |
tree | 8dfa2c5e094015fa7fb88311f7a699e52147409e | |
parent | edfcbcb7e908bc7d08d548f24dbec213ca6d4c8a [diff] |
[FLINK-16415] [tests] Adapt tests to cover the new version field in YAML modules This closes #50.
diff --git a/statefun-e2e-tests/statefun-routable-kafka-e2e/src/test/resources/routable-kafka-ingress-module/module.yaml b/statefun-e2e-tests/statefun-routable-kafka-e2e/src/test/resources/routable-kafka-ingress-module/module.yaml index d9f1b5e..98fee69 100644 --- a/statefun-e2e-tests/statefun-routable-kafka-e2e/src/test/resources/routable-kafka-ingress-module/module.yaml +++ b/statefun-e2e-tests/statefun-routable-kafka-e2e/src/test/resources/routable-kafka-ingress-module/module.yaml
@@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +version: "1.0" + module: meta: type: remote
diff --git a/statefun-flink/statefun-flink-core/src/test/java/org/apache/flink/statefun/flink/core/jsonmodule/JsonModuleTest.java b/statefun-flink/statefun-flink-core/src/test/java/org/apache/flink/statefun/flink/core/jsonmodule/JsonModuleTest.java index b4d307c..a261ea4 100644 --- a/statefun-flink/statefun-flink-core/src/test/java/org/apache/flink/statefun/flink/core/jsonmodule/JsonModuleTest.java +++ b/statefun-flink/statefun-flink-core/src/test/java/org/apache/flink/statefun/flink/core/jsonmodule/JsonModuleTest.java
@@ -102,8 +102,7 @@ } catch (IOException e) { throw new RuntimeException(e); } - JsonNode spec = json.at("/module/spec"); - return new JsonModule(spec, moduleUrl); + return JsonModuleFactory.create(json, moduleUrl); } private static StatefulFunctionsUniverse emptyUniverse() {
diff --git a/statefun-flink/statefun-flink-core/src/test/resources/bar-module/module.yaml b/statefun-flink/statefun-flink-core/src/test/resources/bar-module/module.yaml index e7afab5..61aa52f 100644 --- a/statefun-flink/statefun-flink-core/src/test/resources/bar-module/module.yaml +++ b/statefun-flink/statefun-flink-core/src/test/resources/bar-module/module.yaml
@@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +version: "1.0" + module: meta: type: remote