mirror of https://github.com/databricks/cli.git
remove private repo download test
This commit is contained in:
parent
5b41948a8a
commit
5eddeb42eb
|
@ -6,7 +6,6 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/databricks/cli/libs/cmdio"
|
|
||||||
"github.com/databricks/cli/libs/git"
|
"github.com/databricks/cli/libs/git"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
@ -62,27 +61,3 @@ func TestAccGitClonePublicRepositoryForTagReference(t *testing.T) {
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Contains(t, string(b), "Copyright (2023) Databricks, Inc.")
|
assert.Contains(t, string(b), "Copyright (2023) Databricks, Inc.")
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(file an issue before merge): create a dedicated databricks private repository
|
|
||||||
// and test this for branches and tags
|
|
||||||
func TestAccGitClonePrivateRepository(t *testing.T) {
|
|
||||||
t.Log(GetEnvOrSkipTest(t, "CLOUD_ENV"))
|
|
||||||
|
|
||||||
tmpDir := t.TempDir()
|
|
||||||
cmdIO := cmdio.NewIO("text", os.Stdin, os.Stdout, os.Stderr, "")
|
|
||||||
ctx := cmdio.InContext(context.Background(), cmdIO)
|
|
||||||
|
|
||||||
// This is a private repository only accessible to databricks employees
|
|
||||||
err := git.Clone(ctx, git.CloneOptions{
|
|
||||||
Provider: "github",
|
|
||||||
Organization: "databricks",
|
|
||||||
RepositoryName: "bundle-samples-internal",
|
|
||||||
Reference: "main",
|
|
||||||
TargetDir: tmpDir,
|
|
||||||
})
|
|
||||||
assert.NoError(t, err)
|
|
||||||
|
|
||||||
// assert examples from the private repository
|
|
||||||
assert.DirExists(t, filepath.Join(tmpDir, "bundle-samples-internal-main", "shark_sightings"))
|
|
||||||
assert.DirExists(t, filepath.Join(tmpDir, "bundle-samples-internal-main", "wikipedia_clickstream"))
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue