diff --git a/README.md b/README.md index e6ee173f3..d1e4705d9 100644 --- a/README.md +++ b/README.md @@ -30,3 +30,8 @@ Step by step: 7) Navigate to `http://demo.dev.canhearyou.com:3000/` and boom! Welcome to your new local WeCanHearYou development copy! Change some code, fix some bugs, implement some features and send us your Pull Request! + +# How to run the tests + +1) run `docker-compose up -d pgtest` to start a test-only PostgreSQL database on Docker. +2) run `make test`. \ No newline at end of file diff --git a/app/pkg/env/env.go b/app/pkg/env/env.go index 51eb299fb..c294be417 100644 --- a/app/pkg/env/env.go +++ b/app/pkg/env/env.go @@ -38,8 +38,6 @@ func CurrentDomain() string { return "test.canhearyou.com" case "development": return "dev.canhearyou.com" - case "staging": - return "staging.canhearyou.com" } return "canhearyou.com" @@ -51,8 +49,6 @@ func Current() string { switch env { case "test": return "test" - case "staging": - return "staging" case "production": return "production" } @@ -64,11 +60,6 @@ func IsProduction() bool { return Current() == "production" } -// IsStaging returns true on Wechy staging environment -func IsStaging() bool { - return Current() == "staging" -} - // IsTest returns true on Wechy test environment func IsTest() bool { return Current() == "test" diff --git a/app/pkg/env/env_test.go b/app/pkg/env/env_test.go index a8fa791a1..b7fa37a7c 100644 --- a/app/pkg/env/env_test.go +++ b/app/pkg/env/env_test.go @@ -15,10 +15,9 @@ var envs = []struct { isEnv func() bool }{ {"test", "test.canhearyou.com", "test", env.IsTest}, - {"staging", "staging.canhearyou.com", "staging", env.IsStaging}, {"development", "dev.canhearyou.com", "development", env.IsDevelopment}, {"production", "canhearyou.com", "production", env.IsProduction}, - {"anything", "canhearyou.com", "development", env.IsDevelopment}, + {"anything", "dev.canhearyou.com", "development", env.IsDevelopment}, } func TestGetEnvOrDefault(t *testing.T) {