This is an automated email from the ASF dual-hosted git repository.
dannycranmer pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-connector-aws.git
The following commit(s) were added to refs/heads/main by this push:
new 16b0236 [FLINK-29443] Replicate packaging tests
16b0236 is described below
commit 16b02363591f335ff0b588ddcb64b2a227be7ebc
Author: darenwkt <[email protected]>
AuthorDate: Thu Dec 22 18:30:59 2022 +0000
[FLINK-29443] Replicate packaging tests
---
.../flink/connector/firehose/PackagingITCase.java | 49 ++++++++++++++++++++++
.../flink/connector/kinesis/PackagingITCase.java | 49 ++++++++++++++++++++++
.../flink/connector/dynamodb/PackagingITCase.java | 48 +++++++++++++++++++++
3 files changed, 146 insertions(+)
diff --git
a/flink-sql-connector-aws-kinesis-firehose/src/test/java/org/apache/flink/connector/firehose/PackagingITCase.java
b/flink-sql-connector-aws-kinesis-firehose/src/test/java/org/apache/flink/connector/firehose/PackagingITCase.java
new file mode 100644
index 0000000..5578d59
--- /dev/null
+++
b/flink-sql-connector-aws-kinesis-firehose/src/test/java/org/apache/flink/connector/firehose/PackagingITCase.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.firehose;
+
+import org.apache.flink.packaging.PackagingTestUtils;
+import org.apache.flink.table.factories.Factory;
+import org.apache.flink.test.resources.ResourceTestUtils;
+
+import org.junit.jupiter.api.Test;
+
+import java.nio.file.Path;
+import java.util.Arrays;
+
+class PackagingITCase {
+
+ @Test
+ void testPackaging() throws Exception {
+ final Path jar =
+ ResourceTestUtils.getResource(
+
".*/flink-sql-connector-aws-kinesis-firehose[^/]*\\.jar");
+
+ PackagingTestUtils.assertJarContainsOnlyFilesMatching(
+ jar,
+ Arrays.asList(
+ "org/apache/flink/",
+ "org/apache/commons/",
+ "META-INF/",
+ "mozilla/",
+ "mime.types",
+ "VersionInfo.java"));
+ PackagingTestUtils.assertJarContainsServiceEntry(jar, Factory.class);
+ }
+}
diff --git
a/flink-sql-connector-aws-kinesis-streams/src/test/java/org/apache/flink/connector/kinesis/PackagingITCase.java
b/flink-sql-connector-aws-kinesis-streams/src/test/java/org/apache/flink/connector/kinesis/PackagingITCase.java
new file mode 100644
index 0000000..6b228ff
--- /dev/null
+++
b/flink-sql-connector-aws-kinesis-streams/src/test/java/org/apache/flink/connector/kinesis/PackagingITCase.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.kinesis;
+
+import org.apache.flink.packaging.PackagingTestUtils;
+import org.apache.flink.table.factories.Factory;
+import org.apache.flink.test.resources.ResourceTestUtils;
+
+import org.junit.jupiter.api.Test;
+
+import java.nio.file.Path;
+import java.util.Arrays;
+
+class PackagingITCase {
+
+ @Test
+ void testPackaging() throws Exception {
+ final Path jar =
+ ResourceTestUtils.getResource(
+
".*/flink-sql-connector-aws-kinesis-streams[^/]*\\.jar");
+
+ PackagingTestUtils.assertJarContainsOnlyFilesMatching(
+ jar,
+ Arrays.asList(
+ "org/apache/flink/",
+ "org/apache/commons/",
+ "META-INF/",
+ "mozilla/",
+ "mime.types",
+ "VersionInfo.java"));
+ PackagingTestUtils.assertJarContainsServiceEntry(jar, Factory.class);
+ }
+}
diff --git
a/flink-sql-connector-dynamodb/src/test/java/org/apache/flink/connector/dynamodb/PackagingITCase.java
b/flink-sql-connector-dynamodb/src/test/java/org/apache/flink/connector/dynamodb/PackagingITCase.java
new file mode 100644
index 0000000..ffc709e
--- /dev/null
+++
b/flink-sql-connector-dynamodb/src/test/java/org/apache/flink/connector/dynamodb/PackagingITCase.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.connector.dynamodb;
+
+import org.apache.flink.packaging.PackagingTestUtils;
+import org.apache.flink.table.factories.Factory;
+import org.apache.flink.test.resources.ResourceTestUtils;
+
+import org.junit.jupiter.api.Test;
+
+import java.nio.file.Path;
+import java.util.Arrays;
+
+class PackagingITCase {
+
+ @Test
+ void testPackaging() throws Exception {
+ final Path jar =
+
ResourceTestUtils.getResource(".*/flink-sql-connector-dynamodb[^/]*\\.jar");
+
+ PackagingTestUtils.assertJarContainsOnlyFilesMatching(
+ jar,
+ Arrays.asList(
+ "org/apache/flink/",
+ "org/apache/commons/",
+ "META-INF/",
+ "mozilla/",
+ "mime.types",
+ "VersionInfo.java"));
+ PackagingTestUtils.assertJarContainsServiceEntry(jar, Factory.class);
+ }
+}