mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 17:51:21 +00:00
Absolute basic UT
This commit is contained in:
27
probe/cri/registry_test.go
Normal file
27
probe/cri/registry_test.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package cri_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/weaveworks/scope/probe/cri"
|
||||
)
|
||||
|
||||
func TestParseHttpEndpointUrl(t *testing.T) {
|
||||
_, err := cri.NewCRIClient("http://xyz.com")
|
||||
|
||||
if err == nil {
|
||||
t.Fatal("Should not create client with Http protocol")
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseTcpEndpointUrl(t *testing.T) {
|
||||
client, err := cri.NewCRIClient("127.0.0.1")
|
||||
|
||||
if err != nil {
|
||||
t.Fatal("Should have created service client")
|
||||
}
|
||||
|
||||
if client == nil {
|
||||
t.Fatal("Should have created service client")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user