Resource status display (#6)

* Start experiments

* Going to get resources

* Start to show resources

* Working on statuses

* Displaying statuses

* Fix complexity?
This commit is contained in:
Andrey Pokhilko
2022-09-07 22:37:50 +01:00
committed by GitHub
parent 967d499742
commit a3fb04fbae
8 changed files with 1215 additions and 68 deletions

View File

@@ -3,6 +3,7 @@ package dashboard
import (
log "github.com/sirupsen/logrus"
"helm.sh/helm/v3/pkg/release"
"sync"
"testing"
)
@@ -55,12 +56,28 @@ func TestFlow(t *testing.T) {
}
_ = upgrade
manifests, err := data.RevisionManifests(chart.Namespace, chart.Name, history[len(history)-1].Revision, true)
manifests, err := data.RevisionManifestsParsed(chart.Namespace, chart.Name, history[len(history)-1].Revision)
if err != nil {
t.Fatal(err)
}
_ = manifests
var wg sync.WaitGroup
res := make([]*GenericResource, 0)
for _, m := range manifests {
wg.Add(1)
mc := m // fix the clojure
func() {
defer wg.Done()
lst, err := data.GetResource(chart.Namespace, mc)
if err != nil {
t.Fatal(err)
}
res = append(res, lst)
}()
}
wg.Wait()
diff, err := RevisionDiff(data.RevisionManifests, ".yaml", chart.Namespace, chart.Name, history[len(history)-1].Revision, history[len(history)-2].Revision, true)
if err != nil {
t.Fatal(err)