This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@task | |
def nightly_test(ctx): | |
"""---> Run Component Tests (Behave) - nightly scenarios """ | |
ctx.run("behave tests/features --no-capture --no-capture-stderr --tags=nightly") | |
@task | |
def release_test(ctx): | |
"""---> Run Component Tests (Behave) - release scenarios""" | |
ctx.run("behave tests/features --no-capture --no-capture-stderr --tags=release") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: test source amazon_brazil_v2 | |
@release | |
Scenario: release test | |
When I apply source amazon_br_v2.json to cached htmls amazon_br_v2.response.json for the following queries | |
| queries | | |
| B079FX76R9 | | |
Then I expect response to match the scraped items in amazon_br_v2.response.json | |
@nightly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: publisher-report-fetcher-prod-amazon | |
spec: | |
replicas: 3 | |
template: | |
metadata: | |
labels: | |
app: publisher-report-fetcher-prod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
guice.modules: ${GUICE_MODULES:-[ | |
"io.skai.publisherreportfetcher.amazon.AmazonModule", | |
"io.skai.publisherreportfetcher.google.GoogleModule", | |
# … all other modules | |
]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Singleton | |
class PublisherRegistry @Inject()(publishers: Seq[Publisher]) { | |
def getPublisher(publisherType: PublisherType): Publisher = publishers | |
.find(_.publisherType == publisherType) | |
.getOrElse(failGracefully(publisherType)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GoogleModule extends AbstractModule { | |
override def configure(): Unit = { | |
// Register your implementation of Publisher by adding it to the set: | |
Multibinder.newSetBinder(binder, classOf[Publisher]) | |
.addBinding() | |
.to(classOf[GooglePublisher]) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tzachz.retry | |
import akka.actor.ActorSystem | |
import akka.pattern.Patterns.after | |
import scala.concurrent.duration._ | |
import scala.concurrent.{ExecutionContext, Future} | |
import scala.reflect.ClassTag | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static <T> T any() { | |
return (T) anyObject(); | |
} | |
public static <T> T anyObject() { | |
return (T) reportMatcher(Any.ANY).returnNull(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private def answerSizeOfInputPlus(add: Int): Answer[Int] = invocation => { | |
val inputArg: String = invocation.getArgumentAt(0, classOf[String]) | |
inputArg.length + add | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public <T> OngoingStubbing<T> when(T methodCall) { | |
mockingProgress.stubbingStarted(); | |
return (OngoingStubbing) stub(); | |
} |
NewerOlder