Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

fabric8-services/fabric8-env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenShift.io Environment Managment service

1. Developer Guide

1.1. Prerequisites

go (>=1.8), git, mercurial, make, dep

1.2. Make commands

1.2.1. Build project

Generate Resources: generate goa, sqlbindata, swagger related resources.

make generate
Note
./app/, ./swagger/, sqlbindata*.go under ./migration/** are generated and should not be edited.

Build Project: generate resources, build the project, create executable at ./bin/env.

make build

Clean Project: clean generated resources and vender, tmp, bin directories.

make clean

1.2.2. Run service

Run service on localhost: start service on localhost. Check status at - http://localhost:8080/api/status.

make dev

or alternatively:

export F8_DEVELOPER_MODE_ENABLED=true
docker-compose up -d db
./bin/env
Note
config.yaml is not processed by default. In order to use it, the following environment variable must be set export F8_CONFIG_FILE_PATH="config.yaml"

1.2.3. Execute tests

Unit Test: run tests which does NOT require database.

make test-unit
make test-unit-no-coverage

Integration Test: run tests which requires database. Please run docker-compose command to start database used by integration tests.

docker-compose up -d db
make test-integration
make test-integration-no-coverage