Skip to content

Commit

Permalink
add initial structure
Browse files Browse the repository at this point in the history
Signed-off-by: georgi-l95 <[email protected]>
  • Loading branch information
georgi-l95 committed Sep 12, 2024
1 parent 9dae530 commit 2e610db
Show file tree
Hide file tree
Showing 7 changed files with 192 additions and 0 deletions.
25 changes: 25 additions & 0 deletions buildSrc/src/main/kotlin/com.hedera.block.suites.gradle.kts
Original file line number Diff line number Diff line change
@@ -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<MavenPublication>("maven") { from(components["java"]) }

signing.sign(maven)
2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ plugins {
}

// Include the subprojects
include(":suites")
include(":stream")
include(":server")
include(":simulator")
Expand Down Expand Up @@ -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")

Expand Down
43 changes: 43 additions & 0 deletions suites/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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<Test>("runSuites") {
description = "Runs E2E Test Suites"
group = "suites"

useJUnitPlatform()
testClassesDirs = sourceSets["main"].output.classesDirs
classpath = sourceSets["main"].runtimeClasspath
}
32 changes: 32 additions & 0 deletions suites/src/main/java/com/hedera/block/suites/BaseSuite.java
Original file line number Diff line number Diff line change
@@ -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() {

}
}
Original file line number Diff line number Diff line change
@@ -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.
}
Original file line number Diff line number Diff line change
@@ -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");
}
}
Original file line number Diff line number Diff line change
@@ -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");
}
}

0 comments on commit 2e610db

Please sign in to comment.