Reflect downloader changes in dependency_update

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
pull/31350/head
Benoit Tigeot 1 year ago
parent c8da0c2ebb
commit 9063fd3c46
No known key found for this signature in database
GPG Key ID: 8E6D4FC8AEBDA62C

@ -242,15 +242,14 @@ func TestDependencyUpdateCmd_WithRepoThatWasNotAdded(t *testing.T) {
dir("repositories.yaml"), dir(), contentCache), dir("repositories.yaml"), dir(), contentCache),
) )
if err != nil { // In Helm v4, using a repository that hasn't been explicitly configured should fail
t.Logf("Output: %s", out) if err == nil {
t.Fatal(err) t.Fatalf("expected error for unconfigured repository, got nil. Output: %s", out)
} }
// This is written directly to stdout, so we have to capture as is missingRepoURL := srvForUnmanagedRepo.URL()
if !strings.Contains(out, `Getting updates for unmanaged Helm repositories...`) { if !strings.Contains(out, fmt.Sprintf("repository \"%s\" is not configured.", missingRepoURL)) {
t.Errorf("No ‘unmanaged’ Helm repo used in test chartdependency or it doesn’t cause the creation "+ t.Fatalf("expected error to mention unconfigured repo URL %s. Output:\n%s", missingRepoURL, out)
"of an ‘ad hoc’ repo index cache file\n%s", out)
} }
} }

Loading…
Cancel
Save