Skip to content

Commit

Permalink
try and update integration tests
Browse files Browse the repository at this point in the history
- might have to disable in order to get new p8e-gradle-plugin published in order to fix integration tests ♻️
  • Loading branch information
celloman committed Oct 17, 2023
1 parent b081e2c commit 5e43c2a
Show file tree
Hide file tree
Showing 10 changed files with 187 additions and 169 deletions.
16 changes: 8 additions & 8 deletions integration-test/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.gradle.api.tasks.testing.logging.TestLogEvent.*
import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.gradle.kotlin.dsl.provider.gradleKotlinDslOf
//import org.gradle.kotlin.dsl.provider.gradleKotlinDslOf

group = "io.provenance.p8e.p8e-integration-tests"
version = (project.property("version") as String?)
Expand All @@ -10,7 +10,7 @@ version = (project.property("version") as String?)

plugins {
`jacoco`
kotlin("jvm") version "1.4.32"
kotlin("jvm") version "1.9.10"
// id("com.google.protobuf") version "0.8.13"
}

Expand All @@ -22,7 +22,7 @@ repositories {
}

dependencies {
implementation(kotlin("stdlib", "1.4.32"))
implementation(kotlin("stdlib", "1.9.10"))

// implementation("io.provenance.p8e:p8e-sdk:0.7.+")
// implementation("io.provenance.p8e:p8e-contract-base:1.0-SNAPSHOT")
Expand All @@ -35,8 +35,8 @@ dependencies {
//Don't actually know if this will work or not
// implementation("io.provenance.p8e.p8e-integration-tests:sdkContracts:1.0-SNAPSHOT")

compile("com.google.protobuf:protobuf-java:3.6.+")
compile("com.google.protobuf:protobuf-java-util:3.6.+")
implementation("com.google.protobuf:protobuf-java:3.24.4")
implementation("com.google.protobuf:protobuf-java-util:3.24.4")

// protobuf(files("src/main/protos/"))

Expand All @@ -49,7 +49,7 @@ dependencies {
implementation("io.provenance.scope:sdk:1.0-SNAPSHOT")

//TransactionService.kt
implementation("io.grpc:grpc-stub:1.39.0")
implementation("io.grpc:grpc-stub:1.58.0")
implementation("io.provenance.scope:util:1.0-SNAPSHOT")
implementation("org.bouncycastle:bcprov-jdk15on:1.68")

Expand Down Expand Up @@ -119,7 +119,7 @@ jacoco {

tasks.jacocoTestReport {
reports {
xml.isEnabled = true
csv.isEnabled = false
xml.required.set(true)
csv.required.set(false)
}
}
2 changes: 1 addition & 1 deletion integration-test/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
84 changes: 0 additions & 84 deletions integration-test/sdkContracts/build.gradle

This file was deleted.

96 changes: 96 additions & 0 deletions integration-test/sdkContracts/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import io.provenance.p8e.plugin.P8eLocationExtension
import io.provenance.p8e.plugin.P8ePartyExtension

buildscript {
repositories {
mavenLocal()
jcenter()
mavenCentral()
maven { url = uri("https://javadoc.jitpack.io") }
}

dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10")
classpath("com.bmuschko:gradle-nexus-plugin:2.3.1")
}
}

plugins {
id("io.provenance.p8e.p8e-publish") version "1.0-SNAPSHOT" // todo: update to new version
}

allprojects {
group = "io.provenance.p8e.p8e-integration-tests.sdk"
version = "1.0-SNAPSHOT"

repositories {
mavenLocal()
jcenter()
mavenCentral()
maven { url = uri("https://javadoc.jitpack.io") }
}
}

// This block specifies the configuration needed to connect to a p8e instance as well as the audience list
// for all of the objects that will be created.
p8e {
// Specifies the subproject names for the project containing P8eContract subclasses, and the associated protobuf messages
// that make up those contracts.
contractProject = "contracts" // defaults to "contract"
protoProject = "protos" // defaults to "proto"

// Package locations that the ContractHash and ProtoHash source files will be written to.
language = "kt" // defaults to "java"
contractHashPackage = "io.p8e.contracts.testframework"
protoHashPackage = "io.p8e.proto.testframework"

// specifies all of the p8e locations that this plugin will bootstrap to.
locations = mapOf(
"local" to P8eLocationExtension().apply {
osUrl = System.getenv("OS_GRPC_URL")
provenanceUrl = System.getenv("PROVENANCE_GRPC_URL")
encryptionPrivateKey = System.getenv("ENCRYPTION_PRIVATE_KEY")
signingPrivateKey = System.getenv("SIGNING_PRIVATE_KEY")
chainId = System.getenv("CHAIN_ID")

audience = mapOf(
"local1" to P8ePartyExtension().apply {
publicKey =
"0A41046C57E9E25101D5E553AE003E2F79025E389B51495607C796B4E95C0A94001FBC24D84CD0780819612529B803E8AD0A397F474C965D957D33DD64E642B756FBC4"
},
"local2" to P8ePartyExtension().apply {
publicKey =
"0A4104D630032378D56229DD20D08DBCC6D31F44A07D98175966F5D32CD2189FD748831FCB49266124362E56CC1FAF2AA0D3F362BF84CACBC1C0C74945041EB7327D54"
},
"local3" to P8ePartyExtension().apply {
publicKey =
"0A4104CD5F4ACFFE72D323CCCB2D784847089BBD80EC6D4F68608773E55B3FEADC812E4E2D7C4C647C8C30352141D2926130D10DFC28ACA5CA8A33B7BD7A09C77072CE"
},
"local4" to P8ePartyExtension().apply {
publicKey =
"0A41045E4B322ED16CD22465433B0427A4366B9695D7E15DD798526F703035848ACC8D2D002C1F25190454C9B61AB7B243E31E83BA2B48B8A4441F922A08AC3D0A3268"
},
"local5" to P8ePartyExtension().apply {
publicKey =
"0A4104A37653602DA20D27936AF541084869B2F751953CB0F0D25D320788EDA54FB4BC9FB96A281BFFD97E64B749D78C85871A8E14AFD48048537E45E16F3D2FDDB44B"
},
"test1" to P8ePartyExtension().apply {
publicKey =
"0A4104B3A39EDA72D51F586D72C3F6A8277FF3D3190C17270D7C089AFEB93E8DE5168617A8F925FCD12A08F11ADE4FBB270A74D61B218B675137E2165B326BE8C74AE0"
},
"test2" to P8ePartyExtension().apply {
publicKey =
"0A4104191F22F1FF76D7C762CDCB47C5F87EEF4B0242C1472AF4A58F40A78BC45194968F42F52357CCFE64199988A277912EFF276612B19C9E9448D047827884EC449B"
},
"test3" to P8ePartyExtension().apply {
publicKey =
"0A4104325DB9615E55EFF9034DCBAA3641F0EB271BBBA94D39A05C13A2F2CFBE5456D3723777418B96FEBE155D9858EC4F4360E1C5E922FD4891033FB3DDF633FE533E"
},
"test4" to P8ePartyExtension().apply {
publicKey =
"0A410480308258CB9C12575954BBFEDDC57021F773ABA5A63EB0588F15B535B8AB6EE01617290E1604DEDEA497C18FF47EA43430C7123C79FA90EBD4CF46D9DDB3CC62"
}
)
}
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ buildscript {
}

plugins {
id "maven-publish"
id "kotlin"
id("maven-publish")
id("kotlin")
}

dependencies {
api project(':protos')
api(project(":protos"))
implementation("io.provenance.scope:contract-base:1.0-SNAPSHOT")
}

publishing {
publications {
contract(MavenPublication) {
artifact tasks.jar
create<MavenPublication>("maven") {
artifact("tasks.jar")
}
}
}
Binary file modified integration-test/sdkContracts/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
69 changes: 0 additions & 69 deletions integration-test/sdkContracts/protos/build.gradle

This file was deleted.

Loading

0 comments on commit 5e43c2a

Please sign in to comment.