mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 02:00:43 +00:00
- Kubernetes storage components such as PV and PVC are connected based on two parameters Persistent volume claim name and Persistent Volume name. - PVC contains the volume name which is, PV name itself. Hence, we can show edge for PVC and PV. - This will bring higher level visibility for kubernetes storage components. Signed-off-by: Satyam Zode <satyam.zode@openebs.io>
21 lines
561 B
Go
21 lines
561 B
Go
package render_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/weaveworks/common/test"
|
|
"github.com/weaveworks/scope/render"
|
|
"github.com/weaveworks/scope/render/expected"
|
|
"github.com/weaveworks/scope/test/fixture"
|
|
"github.com/weaveworks/scope/test/reflect"
|
|
"github.com/weaveworks/scope/test/utils"
|
|
)
|
|
|
|
func TestPersistentVolumeRenderer(t *testing.T) {
|
|
have := utils.Prune(render.PersistentVolumeRenderer.Render(fixture.Report).Nodes)
|
|
want := utils.Prune(expected.RenderedPersistentVolume)
|
|
if !reflect.DeepEqual(want, have) {
|
|
t.Error(test.Diff(want, have))
|
|
}
|
|
}
|