From 50a7a20e37fcc2543cddcf8113bd12786fb9ab89 Mon Sep 17 00:00:00 2001 From: "Francisco M. Aramburo Torres" Date: Tue, 3 Mar 2020 16:35:01 +0100 Subject: [PATCH] Fixed smoke tests and firther cleanup --- .../src/main/resources/application.conf | 8 ---- .../src/main/resources/application.conf | 8 ---- .../src/main/resources/application.conf | 8 ---- .../src/main/resources/application.conf | 8 ---- .../src/main/resources/application.conf | 8 ---- .../scala/com/ing/baker/baas/state/Main.scala | 9 ++-- .../resources/kubernetes/bakery-cluster.yaml | 19 +-------- .../kubernetes/example-client-app.yaml | 7 ---- .../kubernetes/example-interactions.yaml | 24 ----------- .../kubernetes/example-listeners.yaml | 14 ------- .../ing/baker/baas/smoke/BakeryFunSpec.scala | 41 ++++++++++--------- .../baas/smoke/EventListenerClient.scala | 10 ++--- .../baker/baas/smoke/ExampleAppClient.scala | 14 +++---- build.sbt | 41 ++++--------------- .../main/scala/webshop/webservice/Main.scala | 10 ----- .../main/scala/webshop/webservice/Main.scala | 9 ---- .../main/scala/webshop/webservice/Main.scala | 9 ---- 17 files changed, 51 insertions(+), 196 deletions(-) delete mode 100644 baas-node-client/src/main/resources/application.conf delete mode 100644 examples/baas-interaction-examples/make-payment/src/main/scala/webshop/webservice/Main.scala delete mode 100644 examples/baas-interaction-examples/reserve-items/src/main/scala/webshop/webservice/Main.scala delete mode 100644 examples/baas-interaction-examples/ship-items/src/main/scala/webshop/webservice/Main.scala diff --git a/baas-node-baker-event-listener/src/main/resources/application.conf b/baas-node-baker-event-listener/src/main/resources/application.conf index 47e0e40b..95e1bde5 100644 --- a/baas-node-baker-event-listener/src/main/resources/application.conf +++ b/baas-node-baker-event-listener/src/main/resources/application.conf @@ -1,12 +1,4 @@ -encryption.enabled = false - -encryption.enabled = ${?BAAS_INGREDIENT_ENCRYPTION_ENABLED} - -encryption.secret = "" - -encryption.secret = ${?BAAS_INGREDIENT_ENCRYPTION_SECRET} - baas-component.http-api-port = "8080" baas-component.http-api-port = ${?BAAS_COMPONENT_HTTP_API_PORT} diff --git a/baas-node-client/src/main/resources/application.conf b/baas-node-client/src/main/resources/application.conf deleted file mode 100644 index 9ccebd17..00000000 --- a/baas-node-client/src/main/resources/application.conf +++ /dev/null @@ -1,8 +0,0 @@ - -encryption.enabled = false - -encryption.enabled = ${?BAAS_INGREDIENT_ENCRYPTION_ENABLED} - -encryption.secret = "" - -encryption.secret = ${?BAAS_INGREDIENT_ENCRYPTION_SECRET} diff --git a/baas-node-event-listener/src/main/resources/application.conf b/baas-node-event-listener/src/main/resources/application.conf index 47e0e40b..95e1bde5 100644 --- a/baas-node-event-listener/src/main/resources/application.conf +++ b/baas-node-event-listener/src/main/resources/application.conf @@ -1,12 +1,4 @@ -encryption.enabled = false - -encryption.enabled = ${?BAAS_INGREDIENT_ENCRYPTION_ENABLED} - -encryption.secret = "" - -encryption.secret = ${?BAAS_INGREDIENT_ENCRYPTION_SECRET} - baas-component.http-api-port = "8080" baas-component.http-api-port = ${?BAAS_COMPONENT_HTTP_API_PORT} diff --git a/baas-node-interaction/src/main/resources/application.conf b/baas-node-interaction/src/main/resources/application.conf index 47e0e40b..95e1bde5 100644 --- a/baas-node-interaction/src/main/resources/application.conf +++ b/baas-node-interaction/src/main/resources/application.conf @@ -1,12 +1,4 @@ -encryption.enabled = false - -encryption.enabled = ${?BAAS_INGREDIENT_ENCRYPTION_ENABLED} - -encryption.secret = "" - -encryption.secret = ${?BAAS_INGREDIENT_ENCRYPTION_SECRET} - baas-component.http-api-port = "8080" baas-component.http-api-port = ${?BAAS_COMPONENT_HTTP_API_PORT} diff --git a/baas-node-state/src/main/resources/application.conf b/baas-node-state/src/main/resources/application.conf index 789907a9..919c064b 100644 --- a/baas-node-state/src/main/resources/application.conf +++ b/baas-node-state/src/main/resources/application.conf @@ -1,13 +1,5 @@ include "baker.conf" -encryption.enabled = false - -encryption.enabled = ${?BAAS_INGREDIENT_ENCRYPTION_ENABLED} - -encryption.secret = "" - -encryption.secret = ${?BAAS_INGREDIENT_ENCRYPTION_SECRET} - baas-component.http-api-port = 8080 baas-component.http-api-port = ${?BAAS_COMPONENT_HTTP_API_PORT} diff --git a/baas-node-state/src/main/scala/com/ing/baker/baas/state/Main.scala b/baas-node-state/src/main/scala/com/ing/baker/baas/state/Main.scala index 9d5efc1c..54406c13 100644 --- a/baas-node-state/src/main/scala/com/ing/baker/baas/state/Main.scala +++ b/baas-node-state/src/main/scala/com/ing/baker/baas/state/Main.scala @@ -43,12 +43,15 @@ object Main extends IOApp { timeouts = AkkaBakerConfig.Timeouts.from(config), bakerValidationSettings = AkkaBakerConfig.BakerValidationSettings.from(config) )(system)) + _ <- Resource.liftF(IO.async[Unit] { callback => + Cluster(system).registerOnMemberUp { + callback(Right(())) + } + }) _ <- Resource.liftF(serviceDiscovery.plugBakerEventListeners(baker)) _ <- StateNodeService.resource(baker, hostname) } yield () - IO(Cluster(system).registerOnMemberUp { - mainResource.use(_ => IO.never).unsafeRunAsyncAndForget() - }).as(ExitCode.Success) + mainResource.use(_ => IO.never).as(ExitCode.Success) } } diff --git a/baas-smoke-tests/src/test/resources/kubernetes/bakery-cluster.yaml b/baas-smoke-tests/src/test/resources/kubernetes/bakery-cluster.yaml index 93726eaf..47686389 100644 --- a/baas-smoke-tests/src/test/resources/kubernetes/bakery-cluster.yaml +++ b/baas-smoke-tests/src/test/resources/kubernetes/bakery-cluster.yaml @@ -1,12 +1,3 @@ -apiVersion: v1 -data: - encryption-secret: c2VjcmV0 -kind: Secret -metadata: - name: ingredient-encryption-secret - ---- - kind: Role apiVersion: rbac.authorization.k8s.io/v1 metadata: @@ -40,7 +31,7 @@ metadata: name: baas-state-service labels: baas-component: state - run: baas-state-service + app: baas-state-service spec: selector: app: baas-state @@ -94,15 +85,9 @@ spec: containerPort: 8080 protocol: TCP env: - - name: BAAS_INGREDIENT_ENCRYPTION_ENABLED - value: "true" - - name: BAAS_INGREDIENT_ENCRYPTION_SECRET - valueFrom: - secretKeyRef: - name: ingredient-encryption-secret - key: encryption-secret #namespace needed for akka discovery - name: NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace + diff --git a/baas-smoke-tests/src/test/resources/kubernetes/example-client-app.yaml b/baas-smoke-tests/src/test/resources/kubernetes/example-client-app.yaml index 5665f88c..3325dc90 100644 --- a/baas-smoke-tests/src/test/resources/kubernetes/example-client-app.yaml +++ b/baas-smoke-tests/src/test/resources/kubernetes/example-client-app.yaml @@ -49,13 +49,6 @@ spec: containerPort: 8082 protocol: TCP env: - - name: BAAS_INGREDIENT_ENCRYPTION_ENABLED - value: "true" - - name: BAAS_INGREDIENT_ENCRYPTION_SECRET - valueFrom: - secretKeyRef: - name: ingredient-encryption-secret - key: encryption-secret - name: BAAS_STATE_NODE_HOSTNAME value: http://baas-state-service:8081/ - name: BAAS_COMPONENT_HTTP_API_PORT diff --git a/baas-smoke-tests/src/test/resources/kubernetes/example-interactions.yaml b/baas-smoke-tests/src/test/resources/kubernetes/example-interactions.yaml index 5501f391..6a849acb 100644 --- a/baas-smoke-tests/src/test/resources/kubernetes/example-interactions.yaml +++ b/baas-smoke-tests/src/test/resources/kubernetes/example-interactions.yaml @@ -36,14 +36,6 @@ spec: - name: baas-interaction image: interaction-webshop.webservice.reserveitemsinstance:3.0.2-SNAPSHOT imagePullPolicy: Never - env: - - name: BAAS_INGREDIENT_ENCRYPTION_ENABLED - value: "true" - - name: BAAS_INGREDIENT_ENCRYPTION_SECRET - valueFrom: - secretKeyRef: - name: ingredient-encryption-secret - key: encryption-secret readinessProbe: httpGet: path: /api/v3/health @@ -97,14 +89,6 @@ spec: - name: baas-interaction image: interaction-webshop.webservice.shipitemsinstance:3.0.2-SNAPSHOT imagePullPolicy: Never - env: - - name: BAAS_INGREDIENT_ENCRYPTION_ENABLED - value: "true" - - name: BAAS_INGREDIENT_ENCRYPTION_SECRET - valueFrom: - secretKeyRef: - name: ingredient-encryption-secret - key: encryption-secret readinessProbe: httpGet: path: /api/v3/health @@ -158,14 +142,6 @@ spec: - name: baas-interaction image: interaction-webshop.webservice.makepaymentinstance:3.0.2-SNAPSHOT imagePullPolicy: Never - env: - - name: BAAS_INGREDIENT_ENCRYPTION_ENABLED - value: "true" - - name: BAAS_INGREDIENT_ENCRYPTION_SECRET - valueFrom: - secretKeyRef: - name: ingredient-encryption-secret - key: encryption-secret readinessProbe: httpGet: path: /api/v3/health diff --git a/baas-smoke-tests/src/test/resources/kubernetes/example-listeners.yaml b/baas-smoke-tests/src/test/resources/kubernetes/example-listeners.yaml index 6c85661e..1de93329 100644 --- a/baas-smoke-tests/src/test/resources/kubernetes/example-listeners.yaml +++ b/baas-smoke-tests/src/test/resources/kubernetes/example-listeners.yaml @@ -59,13 +59,6 @@ spec: env: - name: EXPOSE_EVENTS_PORT value: "8081" - - name: BAAS_INGREDIENT_ENCRYPTION_ENABLED - value: "true" - - name: BAAS_INGREDIENT_ENCRYPTION_SECRET - valueFrom: - secretKeyRef: - name: ingredient-encryption-secret - key: encryption-secret readinessProbe: httpGet: path: /api/v3/health @@ -143,13 +136,6 @@ spec: env: - name: EXPOSE_EVENTS_PORT value: "8081" - - name: BAAS_INGREDIENT_ENCRYPTION_ENABLED - value: "true" - - name: BAAS_INGREDIENT_ENCRYPTION_SECRET - valueFrom: - secretKeyRef: - name: ingredient-encryption-secret - key: encryption-secret readinessProbe: httpGet: path: /api/v3/health diff --git a/baas-smoke-tests/src/test/scala/com/ing/baker/baas/smoke/BakeryFunSpec.scala b/baas-smoke-tests/src/test/scala/com/ing/baker/baas/smoke/BakeryFunSpec.scala index b85bf959..9340ef62 100644 --- a/baas-smoke-tests/src/test/scala/com/ing/baker/baas/smoke/BakeryFunSpec.scala +++ b/baas-smoke-tests/src/test/scala/com/ing/baker/baas/smoke/BakeryFunSpec.scala @@ -124,7 +124,7 @@ abstract class BakeryFunSpec extends fixture.AsyncFunSpecLike { _ <- exec(prefix, command = s"kubectl apply -f $kubernetesConfigPath -n $testUUID") _ = if(args.skipCleanup) { println(Console.YELLOW + s"### Will skip cleanup after the test, to manually clean the environment run: " + Console.RESET) - println(s"\n\tkubectl delete -f $kubernetesConfigPath -n $testUUID\n") + println(s"\n\tkubectl delete -f $kubernetesConfigPath -n $testUUID && kubectl delete namespace $testUUID\n") } } yield testUUID } @@ -139,29 +139,32 @@ abstract class BakeryFunSpec extends fixture.AsyncFunSpecLike { IO( println(Console.GREEN + "Skipped startup, will run the tests immediately" + Console.RESET)) *> IO.pure(0) } - val clientResource = BlazeClientBuilder[IO](executionContext).resource - val exampleAppClient = new ExampleAppClient(clientResource, args.clientAppHostname) - val recipeEventsClient = new EventListenerClient(clientResource, args.eventListenerHostname) - val bakerEventsClient = new EventListenerClient(clientResource, args.bakerEventListenerHostname) - val setupWaitTime = 1.minute - val setupWaitSplit = 3 + val setupWaitTime = 5.minute + val setupWaitSplit = 60 def dontSkipTest: IO[Assertion] = for { namespace <- setup(createEnvironment) - _ <- within(setupWaitTime, setupWaitSplit)(for { - _ <- IO ( println(Console.GREEN + s"\nWaiting for environment (20s)..." + Console.RESET) ) - _ <- getPods(namespace) - status <- exampleAppClient.ping - } yield assert(status.code == 200)) - attempt <- runTest(TestContext( - clientApp = exampleAppClient, - recipeEventListener = recipeEventsClient, - bakerEventListener = bakerEventsClient - )).attempt - _ <- cleanup(deleteEnvironment(namespace)) - outcome <- IO.fromEither(attempt) + outcome <- BlazeClientBuilder[IO](executionContext).resource.use { client => + val exampleAppClient = new ExampleAppClient(client, args.clientAppHostname) + val recipeEventsClient = new EventListenerClient(client, args.eventListenerHostname) + val bakerEventsClient = new EventListenerClient(client, args.bakerEventListenerHostname) + for { + _ <- within(setupWaitTime, setupWaitSplit)(for { + _ <- IO ( println(Console.GREEN + s"\nWaiting for environment (5s)..." + Console.RESET) ) + _ <- getPods(namespace) + status <- exampleAppClient.ping + } yield assert(status.code == 200)) + attempt <- runTest(TestContext( + clientApp = exampleAppClient, + recipeEventListener = recipeEventsClient, + bakerEventListener = bakerEventsClient + )).attempt + _ <- cleanup(deleteEnvironment(namespace)) + outcome <- IO.fromEither(attempt) + } yield outcome + } } yield outcome def skipTest: IO[Assertion] = diff --git a/baas-smoke-tests/src/test/scala/com/ing/baker/baas/smoke/EventListenerClient.scala b/baas-smoke-tests/src/test/scala/com/ing/baker/baas/smoke/EventListenerClient.scala index 8bc664da..d78dfedb 100644 --- a/baas-smoke-tests/src/test/scala/com/ing/baker/baas/smoke/EventListenerClient.scala +++ b/baas-smoke-tests/src/test/scala/com/ing/baker/baas/smoke/EventListenerClient.scala @@ -1,14 +1,14 @@ package com.ing.baker.baas.smoke -import cats.effect.{ContextShift, IO, Resource, Timer} -import org.http4s.{Status, Uri} +import cats.effect.{ContextShift, IO, Timer} import org.http4s.client.Client +import org.http4s.{Status, Uri} -class EventListenerClient(client: Resource[IO, Client[IO]], hostname: Uri)(implicit cs: ContextShift[IO], timer: Timer[IO]) { +class EventListenerClient(client: Client[IO], hostname: Uri)(implicit cs: ContextShift[IO], timer: Timer[IO]) { def ping: IO[Status] = - client.use(_.statusFromUri(hostname / "api")) + client.statusFromUri(hostname / "api") def events: IO[List[String]] = - client.use(_.expect[String](hostname / "api" / "events")).map(_.split(", ").toList) + client.expect[String](hostname / "api" / "events").map(_.split(", ").toList) } diff --git a/baas-smoke-tests/src/test/scala/com/ing/baker/baas/smoke/ExampleAppClient.scala b/baas-smoke-tests/src/test/scala/com/ing/baker/baas/smoke/ExampleAppClient.scala index 95a528aa..90dcf49e 100644 --- a/baas-smoke-tests/src/test/scala/com/ing/baker/baas/smoke/ExampleAppClient.scala +++ b/baas-smoke-tests/src/test/scala/com/ing/baker/baas/smoke/ExampleAppClient.scala @@ -1,6 +1,6 @@ package com.ing.baker.baas.smoke -import cats.effect.{ContextShift, IO, Resource, Timer} +import cats.effect.{ContextShift, IO, Timer} import cats.implicits._ import io.circe.generic.auto._ import io.circe.syntax._ @@ -12,33 +12,33 @@ import org.http4s.{Status, Uri} import webshop.webservice.WebShopService.Implicits._ import webshop.webservice.WebShopService._ -class ExampleAppClient(client: Resource[IO, Client[IO]], hostname: Uri)(implicit cs: ContextShift[IO], timer: Timer[IO]) { +class ExampleAppClient(client: Client[IO], hostname: Uri)(implicit cs: ContextShift[IO], timer: Timer[IO]) { def ping: IO[Status] = - client.use(_.statusFromUri(hostname / "api")) + client.statusFromUri(hostname / "api") def createCheckoutOrder(items: List[String]): IO[String] = { val request = POST( PlaceOrderRequest(items).asJson, hostname / "api" / "order") - client.use(_.expect[PlaceOrderResponse](request)).map(_.orderId) + client.expect[PlaceOrderResponse](request).map(_.orderId) } def addCheckoutAddressInfo(orderId: String, address: String): IO[Unit] = { val request = PUT( AddAddressRequest(address).asJson, hostname / "api" / "order" / orderId / "address") - client.use(_.status(request)).void + client.status(request).void } def addCheckoutPaymentInfo(orderId: String, paymentInfo: String): IO[Unit] = { val request = PUT( AddPaymentRequest(paymentInfo).asJson, hostname / "api" / "order" / orderId / "payment") - client.use(_.status(request)).void + client.status(request).void } def pollOrderStatus(orderId: String): IO[String] = { - client.use(_.expect[PollPaymentStatusResponse](hostname / "api" / "order" / orderId)).map(_.status) + client.expect[PollPaymentStatusResponse](hostname / "api" / "order" / orderId).map(_.status) } } diff --git a/build.sbt b/build.sbt index eb30db60..6c6ae4a5 100644 --- a/build.sbt +++ b/build.sbt @@ -18,7 +18,7 @@ lazy val buildExampleDockerCommand: Command = Command.command("buildExampleDocke "buildInteractionDockerImage docker:publishLocal webshop.webservice.ShipItemsInstance" :: "project baas-interaction-example-reserve-items" :: "buildInteractionDockerImage docker:publishLocal webshop.webservice.ReserveItemsInstance" :: - "project baker" :: + "project baas-smoke-tests" :: state }) @@ -304,7 +304,7 @@ lazy val `baas-node-state` = project.in(file("baas-node-state")) ) ) .settings( - maintainer in Docker := "The Apollo Squad", + maintainer in Docker := "The Bakery Team", packageSummary in Docker := "The core node", packageName in Docker := "baas-node-state", dockerRepository in Docker := sys.env.get("BAAS_DOCKER_REPO") @@ -407,7 +407,7 @@ lazy val `baker-example` = project ) ) .settings( - maintainer in Docker := "The Apollo Squad", + maintainer in Docker := "The Bakery Team", packageSummary in Docker := "A web-shop checkout service example running baker", packageName in Docker := "baker-example-app", dockerExposedPorts := Seq(8080) @@ -440,7 +440,7 @@ lazy val `baas-client-example` = project ) ) .settings( - maintainer in Docker := "The Apollo Squad", + maintainer in Docker := "The Bakery Team", packageSummary in Docker := "A web-shop checkout service example running on baas", packageName in Docker := "baas-client-example", dockerRepository in Docker := sys.env.get("BAAS_DOCKER_REPO") @@ -467,7 +467,7 @@ lazy val `baas-event-listener-example` = project ) ++ testDeps() ) .settings( - maintainer in Docker := "The Apollo Squad", + maintainer in Docker := "The Bakery Team", packageSummary in Docker := "A web-shop checkout service example running on baas", packageName in Docker := "baas-event-listener-example", dockerRepository in Docker := sys.env.get("BAAS_DOCKER_REPO") @@ -494,7 +494,7 @@ lazy val `baas-baker-event-listener-example` = project ) ++ testDeps() ) .settings( - maintainer in Docker := "The Apollo Squad", + maintainer in Docker := "The Bakery Team", packageSummary in Docker := "A web-shop checkout service example running on baas", packageName in Docker := "baas-baker-event-listener-example", dockerRepository in Docker := sys.env.get("BAAS_DOCKER_REPO") @@ -503,6 +503,7 @@ lazy val `baas-baker-event-listener-example` = project lazy val `baas-interaction-example-reserve-items` = project.in(file("examples/baas-interaction-examples/reserve-items")) .enablePlugins(JavaAppPackaging) + .enablePlugins(baas.sbt.BuildInteractionDockerImageSBTPlugin) .settings(commonSettings) .settings( moduleName := "baas-interaction-example-reserve-items", @@ -519,17 +520,11 @@ lazy val `baas-interaction-example-reserve-items` = project.in(file("examples/ba scalaCheck ) ) - .settings( - maintainer in Docker := "The Apollo Squad", - packageSummary in Docker := "The reserve-items interaction", - packageName in Docker := "baas-interaction-example-reserve-items", - dockerRepository in Docker := sys.env.get("BAAS_DOCKER_REPO") - ) .dependsOn(`baas-node-interaction`) - .enablePlugins(baas.sbt.BuildInteractionDockerImageSBTPlugin) lazy val `baas-interaction-example-ship-items` = project.in(file("examples/baas-interaction-examples/ship-items")) .enablePlugins(JavaAppPackaging) + .enablePlugins(baas.sbt.BuildInteractionDockerImageSBTPlugin) .settings(commonSettings) .settings( moduleName := "baas-interaction-example-ship-items", @@ -546,17 +541,11 @@ lazy val `baas-interaction-example-ship-items` = project.in(file("examples/baas- scalaCheck ) ) - .settings( - maintainer in Docker := "The Apollo Squad", - packageSummary in Docker := "The Ship-items interaction", - packageName in Docker := "baas-interaction-example-ship-items", - dockerRepository in Docker := sys.env.get("BAAS_DOCKER_REPO") - ) .dependsOn(`baas-node-interaction`) - .enablePlugins(baas.sbt.BuildInteractionDockerImageSBTPlugin) lazy val `baas-interaction-example-make-payment` = project.in(file("examples/baas-interaction-examples/make-payment")) .enablePlugins(JavaAppPackaging) + .enablePlugins(baas.sbt.BuildInteractionDockerImageSBTPlugin) .settings(commonSettings) .settings( moduleName := "baas-interaction-example-make-payment", @@ -573,19 +562,7 @@ lazy val `baas-interaction-example-make-payment` = project.in(file("examples/baa scalaCheck ) ) - .settings( - maintainer in Docker := "The Apollo Squad", - packageSummary in Docker := "The Make-payment interaction", - packageName in Docker := "baas-interaction-example-make-payment", - dockerRepository in Docker := sys.env.get("BAAS_DOCKER_REPO") - ) .dependsOn(`baas-node-interaction`) - .enablePlugins(baas.sbt.BuildInteractionDockerImageSBTPlugin) - -lazy val `baas-example-setup` = project.in(file("examples/baas-example-setup")) - .aggregate(`baas-node-client`, `baas-node-state`, `baas-node-interaction`, `baas-node-event-listener`, - `baas-client-example`, `baas-event-listener-example`, `baas-baker-event-listener-example`, - `baas-interaction-example-reserve-items`, `baas-interaction-example-make-payment`, `baas-interaction-example-ship-items`) lazy val `baas-smoke-tests` = project.in(file("baas-smoke-tests")) .settings(defaultModuleSettings) diff --git a/examples/baas-interaction-examples/make-payment/src/main/scala/webshop/webservice/Main.scala b/examples/baas-interaction-examples/make-payment/src/main/scala/webshop/webservice/Main.scala deleted file mode 100644 index 2628d58b..00000000 --- a/examples/baas-interaction-examples/make-payment/src/main/scala/webshop/webservice/Main.scala +++ /dev/null @@ -1,10 +0,0 @@ -package webshop.webservice - -import com.ing.baker.baas.scaladsl.RemoteInteraction -import com.ing.baker.runtime.scaladsl.InteractionInstance - -import scala.concurrent.ExecutionContext.Implicits.global - -object Main extends App { - RemoteInteraction.load(InteractionInstance.unsafeFrom(new MakePaymentInstance)) -} \ No newline at end of file diff --git a/examples/baas-interaction-examples/reserve-items/src/main/scala/webshop/webservice/Main.scala b/examples/baas-interaction-examples/reserve-items/src/main/scala/webshop/webservice/Main.scala deleted file mode 100644 index dc632c71..00000000 --- a/examples/baas-interaction-examples/reserve-items/src/main/scala/webshop/webservice/Main.scala +++ /dev/null @@ -1,9 +0,0 @@ -package webshop.webservice - -import com.ing.baker.baas.scaladsl.RemoteInteraction -import com.ing.baker.runtime.scaladsl.InteractionInstance -import concurrent.ExecutionContext.Implicits.global - -object Main extends App { - RemoteInteraction.load(InteractionInstance.unsafeFrom(new ReserveItemsInstance())) -} \ No newline at end of file diff --git a/examples/baas-interaction-examples/ship-items/src/main/scala/webshop/webservice/Main.scala b/examples/baas-interaction-examples/ship-items/src/main/scala/webshop/webservice/Main.scala deleted file mode 100644 index 736ab27c..00000000 --- a/examples/baas-interaction-examples/ship-items/src/main/scala/webshop/webservice/Main.scala +++ /dev/null @@ -1,9 +0,0 @@ -package webshop.webservice - -import com.ing.baker.baas.scaladsl.RemoteInteraction -import com.ing.baker.runtime.scaladsl.InteractionInstance -import concurrent.ExecutionContext.Implicits.global - -object Main extends App { - RemoteInteraction.load(InteractionInstance.unsafeFrom(new ShipItemsInstance)) -} \ No newline at end of file