Skip to content

Commit

Permalink
Merge pull request #3364 from Xivolkar/master
Browse files Browse the repository at this point in the history
#3302: Absolute basic UT
  • Loading branch information
bboreham authored Oct 8, 2018
2 parents 2df3a6c + 68bce4f commit d71a732
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions probe/cri/registry_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package cri_test

import (
"testing"

"github.com/bmizerany/assert"
"github.com/weaveworks/scope/probe/cri"
)

func TestParseHttpEndpointUrl(t *testing.T) {
_, err := cri.NewCRIClient("http://xyz.com")

assert.Equal(t, "protocol \"http\" not supported", err.Error())
}

func TestParseTcpEndpointUrl(t *testing.T) {
client, err := cri.NewCRIClient("127.0.0.1")

assert.Equal(t, nil, err)
assert.NotEqual(t, nil, client)
}

0 comments on commit d71a732

Please sign in to comment.