Code Monkey home page Code Monkey logo

csw-acceptance's Introduction

csw-acceptance

Aim of maintaining this repository is to run all the existing java and scala tests from CSW-PROD repo on published bintray binaries rather than directly on source code.

This repository just contains java and scala test runners. In order to avoid classpath ordering issue, we need to create sub-modules for each service like location, clusterseed etc. (Similar to CSW-PROD repo)

Classpth Ordering issue: If we have single app which depends on all the csw-prod tests libraries then there is no guarantee correct application.conf will be picked up by main application. This results into tests failures. As most of the tests has their own application.conf in their corresponsing test scope.

Every module contains exactly similar app (Run.scala), but each module depends on corresponding csw-prod published test and compile library jar. For Example, location module mainly depends on following:

val `csw-location`       = "org.tmt" %% "csw-location" % Version
val `csw-location-tests` = "org.tmt" %% "csw-location" % Version classifier "tests"

Run application from each module takes following command line arguments:

  1. No Args: This runs both scala and java tests
  2. -java: This just runs java tests
  3. -scala: This just runs scala tests

Pre-requisite (Environment Variable Setup)

Before running any tests, make sure that you have correct env variables setup based on below table:

Env var Value Description
BUILD_ENV PROD If this is set, then Env Var RELEASE_VERSION is expected to be set
BUILD_ENV DEV If this is set, then Env Var DEV_VERSION is expected to be set
RELEASE_VERSION Ex. 0.1.2+1382-e9c8523b+20180223-1035 When BUILD_ENV=PROD then cw-prod libraries with this version will be pulled
DEV_VERSION Ex. 0.1-SNAPSHOT When BUILD_ENV=DEV then cw-prod libraries with this version will be pulled

Running Tests

  1. sbt cluster-seed/run : Runs scala and java tests from cluster-seed
  2. sbt "cluster-seed/run -java" : Runs java tests from cluster-seed
  3. sbt "cluster-seed/run -scala" : Runs scala tests from cluster-seed
  4. run-all.sh : This script runs both scala and java tests from all the projects.

csw-acceptance's People

Contributors

ejoliet avatar jasonweiss avatar kpritam avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.