Commit 086bb1b6 authored by Benoit Orihuela's avatar Benoit Orihuela
Browse files

chore: remove unused sources and samples from Karate demonstration

parent 032b8be7
Loading
Loading
Loading
Loading

karate/.gitignore

deleted100644 → 0
+0 −14
Original line number Diff line number Diff line
.gradle

# Ignore our production

build
target

# VS Code generated files

bin
.classpath
.project
.settings
.vscode

karate/README.md

deleted100644 → 0
+0 −19
Original line number Diff line number Diff line
# How to run the tests

* Launch the tests

```
./gradlew test
```

* Launch the tests against a specific environment:

```
./gradlew -Dkarate.env=dev test
```

* Launch the tests with authentication settings:

```
./gradlew -Dkarate.env=dev -Ddatahub.clientId=<client_id> -Ddatahub.clientSecret=<client_secret> -Ddatahub.authServer=<auth_server> test
```
 No newline at end of file

karate/build.gradle

deleted100644 → 0
+0 −83
Original line number Diff line number Diff line
buildscript {
    ext {
        gradleVersionProperty = '5.6.2'
        karateVersion = '0.9.5.RC5'
        junitVersion = '5.4.0'
    }
    repositories {
        maven { url 'https://plugins.gradle.org/m2/' }
    }
}

apply plugin: 'java'
apply plugin: 'idea'

group = "com.egm.datahub"
version = "0.0.1"

repositories {
    mavenLocal()
    mavenCentral()
}

sourceSets {
    test {
        java {
            // Excluding UIRunner files as these require the javafx libraries
            // which are not shipped with OpenJDK. These UIRunner classes are
            // classes that allow developers to run/debug karate tests via a UI
            // and as such are not required for headless runs on jenkins server
            // but can run happily via IDE of the developer without needed to be
            // compiled by gradle.
            srcDir file('src/test/java')
            exclude '**/*UiRunner*.java'
        }
        resources {
            // Using recommended karate project layout where karate feature files
            // and associated javascript resources sit in same /test/java folders
            // as their java counterparts.
            srcDir file('src/test/java')
            exclude '**/*.java'
        }
    }
}

dependencies {
    testImplementation 'com.intuit.karate:karate-junit5:' + karateVersion
    testImplementation 'com.intuit.karate:karate-apache:' + karateVersion
    testImplementation 'net.masterthought:cucumber-reporting:3.8.0'

    // still required until Karate 0.9.5 (https://github.com/intuit/karate/issues/823#issuecomment-509608205)
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:' + junitVersion
}

test {
    // When running the test task, only run the base Test class which runs all cucumber tests in parallel.
    include '**/*ApiTests*'

    // To "activate" JUnit5 engine
    useJUnitPlatform()

    // Pull karate options into the runtime
    systemProperty "karate.options", System.properties.getProperty("karate.options")
    // Pull karate options into the JVM
    systemProperty "karate.env", System.properties.getProperty("karate.env")
    
    // I would prefer having a way to automatically pass all datahub properties ...
    // To be investigated later
    systemProperty "datahub.urlBase", System.properties.getProperty("datahub.urlBase")
    systemProperty "datahub.authServer", System.properties.getProperty("datahub.authServer")
    systemProperty "datahub.clientId", System.properties.getProperty("datahub.clientId")
    systemProperty "datahub.clientSecret", System.properties.getProperty("datahub.clientSecret")

    // Ensure tests are always run
    outputs.upToDateWhen { false }
    // attach debugger
    if (System.getProperty('debug', 'false') == 'true') {
        jvmArgs '-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9009'
    }
}

wrapper {
    gradleVersion = gradleVersionProperty
}
−57.3 KiB

File deleted.

+0 −5
Original line number Diff line number Diff line
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading