mirror of https://github.com/databricks/cli.git
replace $DEV_VERSION
This commit is contained in:
parent
6c203fb957
commit
831ae571b2
|
@ -124,6 +124,7 @@ func testAccept(t *testing.T, InprocessMode bool, singleTest string) int {
|
|||
testdiff.PrepareReplacementsUser(t, &repls, *user)
|
||||
testdiff.PrepareReplacementsWorkspaceClient(t, &repls, workspaceClient)
|
||||
testdiff.PrepareReplacementsUUID(t, &repls)
|
||||
testdiff.PrepareReplacementsDevVersion(t, &repls)
|
||||
|
||||
testDirs := getTests(t)
|
||||
require.NotEmpty(t, testDirs)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Info: start version=0.0.0-dev+abe693a9ae98 args="$CLI, bundle, validate, --debug"
|
||||
Info: start version=$DEV_VERSION args="$CLI, bundle, validate, --debug"
|
||||
Debug: Found bundle root at $TMPDIR (file $TMPDIR/databricks.yml)
|
||||
Debug: Apply mutator=load
|
||||
Info: Phase: load mutator=load
|
||||
|
|
|
@ -23,6 +23,7 @@ var (
|
|||
uuidRegex = regexp.MustCompile(`[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}`)
|
||||
numIdRegex = regexp.MustCompile(`[0-9]{3,}`)
|
||||
privatePathRegex = regexp.MustCompile(`(/tmp|/private)(/.*)/([a-zA-Z0-9]+)`)
|
||||
devVersionRegex = regexp.MustCompile(`0\.0\.0-dev\+[a-f0-9]{10,16}`)
|
||||
)
|
||||
|
||||
type Replacement struct {
|
||||
|
@ -207,3 +208,8 @@ func PrepareReplacementsTemporaryDirectory(t testutil.TestingT, r *ReplacementsC
|
|||
t.Helper()
|
||||
r.append(privatePathRegex, "/tmp/.../$3")
|
||||
}
|
||||
|
||||
func PrepareReplacementsDevVersion(t testutil.TestingT, r *ReplacementsContext) {
|
||||
t.Helper()
|
||||
r.append(devVersionRegex, "$$DEV_VERSION")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue