cadvisor/container/raw/container_desc_test.go
Abin Shahab a02b7f1620 Added network stats to raw handler
Raw handler now parses an optional json file with the network interface information, and emits network stats.
2014-10-14 20:01:44 +00:00

19 lines
388 B
Go

package raw
import (
"testing"
)
func TestUnmarshal(t *testing.T) {
cDesc, err := Unmarshal("test_resources/cdesc.json")
if err != nil {
t.Fatalf("Error in unmarshalling: %s", err)
}
if cDesc.All_hosts[0].Network_interface.VethHost != "veth24031eth1" &&
cDesc.All_hosts[0].Network_interface.VethChild != "eth1" {
t.Errorf("Cannot find network interface in %s", cDesc)
}
}