changing the logic for offline install

This commit is contained in:
hari-selvarajan_data 2025-01-27 20:02:21 +00:00
parent 870003d2fc
commit 4ed82deb9a
3 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@ func TestLoadsReleasesForCLI(t *testing.T) {
ctx := context.Background() ctx := context.Background()
ctx = WithApiOverride(ctx, server.URL) ctx = WithApiOverride(ctx, server.URL)
r := NewReleaseCache("databricks", "cli", t.TempDir()) r := NewReleaseCache("databricks", "cli", t.TempDir(), false)
all, err := r.Load(ctx) all, err := r.Load(ctx)
assert.NoError(t, err) assert.NoError(t, err)
assert.Len(t, all, 2) assert.Len(t, all, 2)

View File

@ -270,7 +270,7 @@ func TestOfflineInstallerWorksForReleases(t *testing.T) {
ctx = env.Set(ctx, "DATABRICKS_CLUSTER_ID", "installer-cluster") ctx = env.Set(ctx, "DATABRICKS_CLUSTER_ID", "installer-cluster")
ctx = env.Set(ctx, "DATABRICKS_WAREHOUSE_ID", "installer-warehouse") ctx = env.Set(ctx, "DATABRICKS_WAREHOUSE_ID", "installer-warehouse")
r := testcli.NewRunner(t, ctx, "labs", "install", "blueprint", "--offline-install=true", "--debug") r := testcli.NewRunner(t, ctx, "labs", "install", "blueprint", "--offline=true", "--debug")
r.RunAndExpectOutput("setting up important infrastructure") r.RunAndExpectOutput("setting up important infrastructure")
} }

View File

@ -307,7 +307,7 @@ func (p *Project) checkUpdates(cmd *cobra.Command) error {
// might not be installed yet // might not be installed yet
return nil return nil
} }
r := github.NewReleaseCache("databrickslabs", p.Name, p.CacheDir()) r := github.NewReleaseCache("databrickslabs", p.Name, p.CacheDir(), false)
versions, err := r.Load(ctx) versions, err := r.Load(ctx)
if err != nil { if err != nil {
return err return err