Created
March 6, 2018 12:22
-
-
Save psturc/39dcb0bb48bd63670afdbc2b9c1fbd79 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
psturc@Pavels-MacBook-Pro ~/gocode/src/github.com/aerogear/aerogear-app-metrics [13:21:49] | |
> $ docker ps -a | grep sql ⬡ 6.11.3 [±fix-responses ✓] | |
psturc@Pavels-MacBook-Pro ~/gocode/src/github.com/aerogear/aerogear-app-metrics [13:22:02] | |
> $ make test-integration ⬡ 6.11.3 [±fix-responses ✓] | |
Running tests: | |
go test -v -race -cover -tags=integration \ | |
github.com/aerogear/aerogear-app-metrics/pkg/config github.com/aerogear/aerogear-app-metrics/pkg/dao github.com/aerogear/aerogear-app-metrics/pkg/mobile github.com/aerogear/aerogear-app-metrics/pkg/web | |
=== RUN TestConfig | |
--- PASS: TestConfig (0.00s) | |
PASS | |
coverage: 100.0% of statements | |
ok github.com/aerogear/aerogear-app-metrics/pkg/config (cached) coverage: 100.0% of statements | |
=== RUN TestIsHealthy | |
--- PASS: TestIsHealthy (0.02s) | |
=== RUN TestIsHealthyWhenDisconnected | |
--- PASS: TestIsHealthyWhenDisconnected (0.02s) | |
=== RUN TestCreate | |
--- PASS: TestCreate (0.02s) | |
=== RUN TestCreateBadJSON | |
--- PASS: TestCreateBadJSON (0.01s) | |
=== RUN TestCreateEmptyClientID | |
--- PASS: TestCreateEmptyClientID (0.02s) | |
=== RUN TestCreateClientTimestamp | |
--- PASS: TestCreateClientTimestamp (0.02s) | |
=== RUN TestConnect | |
--- PASS: TestConnect (0.02s) | |
=== RUN TestConnectAlreadyConnected | |
--- PASS: TestConnectAlreadyConnected (0.01s) | |
=== RUN TestDisconnect | |
--- PASS: TestDisconnect (0.02s) | |
=== RUN TestDisconnectNotConnected | |
--- PASS: TestDisconnectNotConnected (0.00s) | |
=== RUN TestDoInitialSetup | |
--- PASS: TestDoInitialSetup (0.03s) | |
=== RUN TestDoInitialSetupNotConnected | |
--- PASS: TestDoInitialSetupNotConnected (0.00s) | |
PASS | |
coverage: 84.6% of statements | |
ok github.com/aerogear/aerogear-app-metrics/pkg/dao (cached) coverage: 84.6% of statements | |
=== RUN TestCreateCallsDAOWithCorrectArgs | |
--- PASS: TestCreateCallsDAOWithCorrectArgs (0.00s) | |
mock.go:415: PASS: Create(string,[]uint8,*time.Time) | |
=== RUN TestCreateReturnsErrorFromDAO | |
--- PASS: TestCreateReturnsErrorFromDAO (0.00s) | |
mock.go:415: PASS: Create(string,[]uint8,*time.Time) | |
=== RUN TestCreateCallsDaoWithCorrectTimestamp | |
--- PASS: TestCreateCallsDaoWithCorrectTimestamp (0.00s) | |
mock.go:415: PASS: Create(string,[]uint8,*time.Time) | |
=== RUN TestMetricValidate | |
--- PASS: TestMetricValidate (0.00s) | |
PASS | |
coverage: 96.8% of statements | |
ok github.com/aerogear/aerogear-app-metrics/pkg/mobile (cached) coverage: 96.8% of statements | |
=== RUN TestPing | |
--- PASS: TestPing (0.00s) | |
=== RUN TestHealthzPing | |
--- PASS: TestHealthzPing (0.00s) | |
mock.go:415: PASS: IsHealthy() | |
mock.go:415: PASS: IsHealthy() | |
=== RUN TestMetricsEndpointShouldPassReceivedDataToMetricsService | |
time="2018-03-06T13:03:32+01:00" level=info client_ip="127.0.0.1:52235" method=POST path=/metrics response_time="782.14µs" | |
--- PASS: TestMetricsEndpointShouldPassReceivedDataToMetricsService (0.01s) | |
mock.go:415: PASS: Create(mobile.Metric) | |
=== RUN TestMetricsEndpointShouldReturn500WhenThereIsAnErrorInMetricsService | |
time="2018-03-06T13:03:32+01:00" level=error msg="error creating metric" error="Metrics service error!" | |
time="2018-03-06T13:03:32+01:00" level=info client_ip="127.0.0.1:52237" method=POST path=/metrics response_time="776.594µs" | |
--- PASS: TestMetricsEndpointShouldReturn500WhenThereIsAnErrorInMetricsService (0.00s) | |
mock.go:415: PASS: Create(mobile.Metric) | |
=== RUN TestMetricsEndpointShouldNotInteractWithMetricsServiceWhenRequestBodyIsEmpty | |
time="2018-03-06T13:03:32+01:00" level=error msg="error parsing client payload" error=EOF | |
time="2018-03-06T13:03:32+01:00" level=info client_ip="127.0.0.1:52239" method=POST path=/metrics response_time="140.273µs" | |
--- PASS: TestMetricsEndpointShouldNotInteractWithMetricsServiceWhenRequestBodyIsEmpty (0.00s) | |
=== RUN TestMetricsEndpointShouldNotInteractWithMetricsServiceWhenRequestBodyIsInvalidJSON | |
time="2018-03-06T13:03:32+01:00" level=error msg="error parsing client payload" error="invalid character 'o' in literal null (expecting 'u')" | |
time="2018-03-06T13:03:32+01:00" level=info client_ip="127.0.0.1:52241" method=POST path=/metrics response_time="249.88µs" | |
--- PASS: TestMetricsEndpointShouldNotInteractWithMetricsServiceWhenRequestBodyIsInvalidJSON (0.00s) | |
PASS | |
coverage: 85.7% of statements | |
ok github.com/aerogear/aerogear-app-metrics/pkg/web (cached) coverage: 85.7% of statements |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment