Skip to content

Commit

Permalink
feat: add streaming http-to-http sample (#102)
Browse files Browse the repository at this point in the history
* feat: add streaming http-to-http sample

* cleanup

* PR remark
  • Loading branch information
ndr-brt authored Sep 5, 2023
1 parent ac86b18 commit be8fcd6
Show file tree
Hide file tree
Showing 54 changed files with 1,214 additions and 310 deletions.
39 changes: 0 additions & 39 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

25 changes: 0 additions & 25 deletions .github/PULL_REQUEST_TEMPLATE

This file was deleted.

2 changes: 1 addition & 1 deletion basic/basic-01-basic-connector/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
plugins {
`java-library`
id("application")
id("com.github.johnrengelman.shadow") version "8.1.1"
alias(libs.plugins.shadow)
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion basic/basic-02-health-endpoint/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
plugins {
`java-library`
id("application")
id("com.github.johnrengelman.shadow") version "8.1.1"
alias(libs.plugins.shadow)
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion basic/basic-03-configuration/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
plugins {
`java-library`
id("application")
id("com.github.johnrengelman.shadow") version "8.1.1"
alias(libs.plugins.shadow)
}

dependencies {
Expand Down
2 changes: 0 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ allprojects {
configure<org.eclipse.edc.plugins.edcbuild.extensions.BuildExtension> {
versions {
// override default dependency versions here
projectVersion.set(edcVersion)
metaModel.set(edcVersion)
}
publish.set(false)
Expand All @@ -53,7 +52,6 @@ allprojects {
configDirectory.set(rootProject.file("resources"))
}


// EdcRuntimeExtension uses this to determine the runtime classpath of the module to run.
tasks.register("printClasspath") {
doLast {
Expand Down
3 changes: 3 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ edc = "0.2.1"
jakarta-json = "2.0.1"
junit-pioneer = "2.0.1"
jupiter = "5.10.0"
okhttp-mockwebserver = "5.0.0-alpha.11"
openTelemetry = "1.18.0"
restAssured = "5.3.1"
rsApi = "3.1.0"
Expand Down Expand Up @@ -40,6 +41,7 @@ edc-http = { module = "org.eclipse.edc:http", version.ref = "edc" }
edc-iam-mock = { module = "org.eclipse.edc:iam-mock", version.ref = "edc" }
edc-jersey-micrometer = { module = "org.eclipse.edc:jersey-micrometer", version.ref = "edc" }
edc-jetty-micrometer = { module = "org.eclipse.edc:jetty-micrometer", version.ref = "edc" }
edc-json-ld = { module = "org.eclipse.edc:json-ld", version.ref = "edc" }
edc-junit = { module = "org.eclipse.edc:junit", version.ref = "edc" }
edc-management-api = { module = "org.eclipse.edc:management-api", version.ref = "edc" }
edc-micrometer-core = { module = "org.eclipse.edc:micrometer-core", version.ref = "edc" }
Expand All @@ -59,6 +61,7 @@ junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.re
junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "jupiter" }
junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "jupiter" }
junit-pioneer = { module = "org.junit-pioneer:junit-pioneer", version.ref = "junit-pioneer" }
okhttp-mockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttp-mockwebserver" }
opentelemetry-annotations = { module = "io.opentelemetry:opentelemetry-extension-annotations", version.ref = "openTelemetry" }
restAssured = { module = "io.rest-assured:rest-assured", version.ref = "restAssured" }

Expand Down
2 changes: 1 addition & 1 deletion other/custom-runtime/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
plugins {
`java-library`
id("application")
id("com.github.johnrengelman.shadow") version "8.1.1"
alias(libs.plugins.shadow)
}

dependencies {
Expand Down
8 changes: 5 additions & 3 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ include(":transfer:transfer-05-file-transfer-cloud:cloud-transfer-provider")
include(":transfer:transfer-05-file-transfer-cloud:transfer-file-cloud")

include("transfer:transfer-06-consumer-pull-http:http-pull-connector")
include("transfer:transfer-06-consumer-pull-http:consumer-pull-backend-service")

include("transfer:transfer-07-provider-push-http:http-push-connector")
include("transfer:transfer-07-provider-push-http:provider-push-http-backend-service")

include("transfer:streaming:streaming-01-http-to-http:streaming-01-runtime")

include("util:http-request-logger")


// modules for code samples ------------------------------------------------------------------------
include(":other:custom-runtime")
Expand Down
5 changes: 4 additions & 1 deletion system-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ plugins {
}

dependencies {
implementation(libs.edc.junit)
implementation(libs.edc.transfer.spi)

testImplementation(libs.edc.junit)
testImplementation(libs.edc.json.ld)
testImplementation(libs.awaitility)
testImplementation(libs.okhttp.mockwebserver)
testImplementation(libs.restAssured)

// runtimes
Expand All @@ -31,4 +33,5 @@ dependencies {
testCompileOnly(project(":transfer:transfer-01-file-transfer:file-transfer-provider"))
testCompileOnly(project(":transfer:transfer-02-file-transfer-listener:file-transfer-listener-consumer"))
testCompileOnly(project(":transfer:transfer-03-modify-transferprocess:modify-transferprocess-consumer"))
testCompileOnly(project(":transfer:streaming:streaming-01-http-to-http:streaming-01-runtime"))
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.time.Duration;
import java.util.Map;

Expand All @@ -36,7 +37,7 @@
import static org.hamcrest.Matchers.not;

/**
* Encapsulates common settings, test steps, and helper methods for the test for samples 4.x.
* Encapsulates common settings, test steps, and helper methods for transfer samples
*/
public class FileTransferSampleTestCommon {

Expand Down Expand Up @@ -78,6 +79,19 @@ public static File getFileFromRelativePath(String relativePath) {
return new File(TestUtils.findBuildRoot(), relativePath);
}

/**
* Resolves a {@link File} instance from a relative path.
*/
@NotNull
public static String getFileContentFromRelativePath(String relativePath) {
var fileFromRelativePath = getFileFromRelativePath(relativePath);
try {
return Files.readString(Paths.get(fileFromRelativePath.toURI()));
} catch (IOException e) {
throw new RuntimeException(e);
}
}

/**
* Assert that prerequisites are fulfilled before running the test.
* This assertion checks only whether the file to be copied is not existing already.
Expand Down
Loading

0 comments on commit be8fcd6

Please sign in to comment.