mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-04 10:41:14 +00:00
* 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.
25 lines
406 B
Go
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))
|
|
}
|
|
}
|