Skip to content

Commit

Permalink
try codecov tool
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexei Ledenev committed Aug 11, 2016
1 parent f104d40 commit 34395cf
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
2 changes: 2 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ test:
post:
# copy test results
- cp .cover/*_tests.xml $CIRCLE_TEST_REPORTS
# push coverage data to codecov
- bash <(curl -s https://codecov.io/bash)
deployment:
continuous:
branch: [develop, /feature_.*/]
Expand Down
11 changes: 11 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
coverage:
ignore:
- "container/mock.go"
- "container/mockengine.go"
notify:
webhook:
default:
url: "https://webhook.boris.gaiahub.io/wh/3a44a3cd-66e6-4dd1-83e0-f6bde38fc08e/b645da493e7d4ea7c0339679e9987b788412a487"
threshold: null
brunches: null
only_pulls: false
4 changes: 4 additions & 0 deletions container/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -650,3 +650,7 @@ func TestNetemContainerIPFilter_Success(t *testing.T) {
assert.NoError(t, err)
engineClient.AssertExpectations(t)
}

func Test_execOnContainer(t *testing.T) {

}
29 changes: 29 additions & 0 deletions container/mockengine_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package container

import (
"reflect"
"testing"

egineapi "github.com/docker/engine-api/client"
)

func TestMockEngineInterface(t *testing.T) {
mock := &MockEngine{}

iface := reflect.TypeOf((*egineapi.ContainerAPIClient)(nil)).Elem()
if !reflect.TypeOf(mock).Implements(iface) {
t.Fatalf("Mock does not implement the ContainerAPIClient interface")
}
iface = reflect.TypeOf((*egineapi.ImageAPIClient)(nil)).Elem()
if !reflect.TypeOf(mock).Implements(iface) {
t.Fatalf("Mock does not implement the ImageAPIClient interface")
}
iface = reflect.TypeOf((*egineapi.NetworkAPIClient)(nil)).Elem()
if !reflect.TypeOf(mock).Implements(iface) {
t.Fatalf("Mock does not implement the NetworkAPIClient interface")
}
iface = reflect.TypeOf((*egineapi.VolumeAPIClient)(nil)).Elem()
if !reflect.TypeOf(mock).Implements(iface) {
t.Fatalf("Mock does not implement the VolumeAPIClient interface")
}
}

0 comments on commit 34395cf

Please sign in to comment.