Files
weave-scope/report/table_test.go
Tom Wilkie 9eda27822c Show k8s labels and container env vars in the details panel. (#1342)
* Show k8s labels and container env vars in the details panel.

* Add show more bar to the env vars and labels

* React key was in the wrong place; empty tables render section labels.
2016-04-20 08:18:03 +01:00

25 lines
406 B
Go

package report_test
import (
"reflect"
"testing"
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test"
)
func TestTables(t *testing.T) {
want := map[string]string{
"foo1": "bar1",
"foo2": "bar2",
}
nmd := report.MakeNode("foo1")
nmd = nmd.AddTable("foo_", want)
have := nmd.ExtractTable("foo_")
if !reflect.DeepEqual(want, have) {
t.Error(test.Diff(want, have))
}
}