logger icon indicating copy to clipboard operation
logger copied to clipboard

separate redis test from the unit test

Open jchauncey opened this issue 9 years ago • 7 comments

Since we are having to start an external component we are mixing terms when we call the test suit unit tests. Therefore, we should move the redis tests out to an integration target.

jchauncey avatar Jul 07 '16 18:07 jchauncey

The separation is already done via the testredis build tag. The Makefile enables these tests in its test-unit target (https://github.com/deis/logger/blob/master/Makefile#L119), but the new build target is not in place

arschles avatar Jul 07 '16 18:07 arschles

Yeah but that tag says to run the redis tests. I am saying dont do that as part of test-unit. Instead do that as test-integration

jchauncey avatar Jul 07 '16 18:07 jchauncey

Sorry, that tag is poorly named. It enables the redis tests, which run in addition to all the other tests. Thoughts on these test targets?

test-all:
  // runs all tests, including integration
  $(DOCKER_CMD) go build -tags="testredis" $(glide nv)
test-unit:
  // runs only unit tests, with no external dependencies
  $(DOCKER_CMD) go build $(glide nv)

arschles avatar Jul 07 '16 18:07 arschles

yeah. i would love to be able to just run the integration tests though.

jchauncey avatar Jul 07 '16 19:07 jchauncey

test-all: test-unit test-integration

Is what im thinking we should do

jchauncey avatar Jul 07 '16 19:07 jchauncey

@jchauncey we could add capability to run just integration tests by checking a LOGGER_TEST_INTEGRATION env var in unit tests. If it exists, unit tests should bail out. I can research some other options too.

arschles avatar Jul 07 '16 19:07 arschles

This issue was moved to teamhephy/logger#6

Cryptophobia avatar Mar 13 '18 19:03 Cryptophobia