diff --git a/buildSrc/src/main/kotlin/com.hedera.block.suites.gradle.kts b/buildSrc/src/main/kotlin/com.hedera.block.suites.gradle.kts new file mode 100644 index 000000000..f5361b330 --- /dev/null +++ b/buildSrc/src/main/kotlin/com.hedera.block.suites.gradle.kts @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2024 Hedera Hashgraph, LLC + * + * Licensed 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. + */ + +plugins { + id("application") + id("com.hedera.block.conventions") + id("me.champeau.jmh") +} + +val maven = publishing.publications.create("maven") { from(components["java"]) } + +signing.sign(maven) diff --git a/settings.gradle.kts b/settings.gradle.kts index 5cdb9b67e..da281ec3b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -19,6 +19,7 @@ plugins { } // Include the subprojects +include(":suites") include(":stream") include(":server") include(":simulator") @@ -95,6 +96,7 @@ dependencyResolutionManagement { // Testing only versions version("org.assertj.core", "3.23.1") version("org.junit.jupiter.api", "5.10.2") + version("org.junit.platform", "1.11.0") version("org.mockito", "5.8.0") version("org.mockito.junit.jupiter", "5.8.0") diff --git a/suites/build.gradle.kts b/suites/build.gradle.kts new file mode 100644 index 000000000..c953f7bac --- /dev/null +++ b/suites/build.gradle.kts @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2022-2024 Hedera Hashgraph, LLC + * + * Licensed 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. + */ + +plugins { + id("application") + id("com.hedera.block.suites") +} + +description = "Hedera Block Node E2E Suites" + +application { + mainModule = "com.hedera.block.suites" + mainClass = "com.hedera.block.suites.BaseSuite" +} + +mainModuleInfo { + requires("org.junit.jupiter.api") + requires("org.junit.platform.suite.api") + runtimeOnly("org.junit.jupiter.engine") +} + + +tasks.register("runSuites") { + description = "Runs E2E Test Suites" + group = "suites" + + useJUnitPlatform() + testClassesDirs = sourceSets["main"].output.classesDirs + classpath = sourceSets["main"].runtimeClasspath +} \ No newline at end of file diff --git a/suites/src/main/java/com/hedera/block/suites/BaseSuite.java b/suites/src/main/java/com/hedera/block/suites/BaseSuite.java new file mode 100644 index 000000000..7f073968f --- /dev/null +++ b/suites/src/main/java/com/hedera/block/suites/BaseSuite.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2022-2024 Hedera Hashgraph, LLC + * + * Licensed 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 com.hedera.block.suites; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.AfterEach; + +public abstract class BaseSuite { + @BeforeEach + public void setup() { + + } + + @AfterEach + public void teardown() { + + } +} diff --git a/suites/src/main/java/com/hedera/block/suites/stream/StreamTestSuites.java b/suites/src/main/java/com/hedera/block/suites/stream/StreamTestSuites.java new file mode 100644 index 000000000..ffbf0c354 --- /dev/null +++ b/suites/src/main/java/com/hedera/block/suites/stream/StreamTestSuites.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2022-2024 Hedera Hashgraph, LLC + * + * Licensed 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 com.hedera.block.suites.stream; + +import com.hedera.block.suites.stream.negative.NegativeBlockStreamTests; +import com.hedera.block.suites.stream.positive.PositiveBlockStreamTests; +import org.junit.platform.suite.api.SelectClasses; +import org.junit.platform.suite.api.Suite; + +@Suite +@SelectClasses({ + PositiveBlockStreamTests.class, + NegativeBlockStreamTests.class +}) +public class StreamTestSuites { + // This class only serves as a suite entry point; no need to add any logic here. +} diff --git a/suites/src/main/java/com/hedera/block/suites/stream/negative/NegativeBlockStreamTests.java b/suites/src/main/java/com/hedera/block/suites/stream/negative/NegativeBlockStreamTests.java new file mode 100644 index 000000000..add62274c --- /dev/null +++ b/suites/src/main/java/com/hedera/block/suites/stream/negative/NegativeBlockStreamTests.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2022-2024 Hedera Hashgraph, LLC + * + * Licensed 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 com.hedera.block.suites.stream.negative; + +import com.hedera.block.suites.BaseSuite; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; + +@DisplayName("Positive Block Stream Tests") +public class NegativeBlockStreamTests extends BaseSuite { + @Test + public void testValidBlockStreamProcessing() { + System.out.println("testValidBlockStreamProcessing"); + } +} diff --git a/suites/src/main/java/com/hedera/block/suites/stream/positive/PositiveBlockStreamTests.java b/suites/src/main/java/com/hedera/block/suites/stream/positive/PositiveBlockStreamTests.java new file mode 100644 index 000000000..348f67f81 --- /dev/null +++ b/suites/src/main/java/com/hedera/block/suites/stream/positive/PositiveBlockStreamTests.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2022-2024 Hedera Hashgraph, LLC + * + * Licensed 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 com.hedera.block.suites.stream.positive; + +import com.hedera.block.suites.BaseSuite; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; + +@DisplayName("Positive Block Stream Tests") +public class PositiveBlockStreamTests extends BaseSuite { + + @Test + public void testValidBlockStreamProcessing() { + System.out.println("testValidBlockStreamProcessing"); + } +}