mirror of https://github.com/databricks/cli.git
fix test and improve error
This commit is contained in:
parent
fa545777bd
commit
73826acb2f
|
@ -245,13 +245,14 @@ func GetFilerForLibraries(ctx context.Context, b *bundle.Bundle, uploadPath stri
|
|||
// the schema was?
|
||||
l, ok := locationForVolume(b, catalogName, schemaName, volumeName)
|
||||
if !ok {
|
||||
return nil, diag.Errorf("UC volume %s does not exist", volumePath)
|
||||
return nil, diag.Errorf("the bundle is configured to upload artifacts to %s but a UC volume at %s does not exist", uploadPath, volumePath)
|
||||
}
|
||||
|
||||
return nil, diag.Errorf(`UC volume %s does not exist. Note: We detected that
|
||||
you have a UC volume defined that matched the path above at %s.
|
||||
Please deploy the UC volume separately before using it in as a
|
||||
destination to upload artifacts.`, l, volumePath)
|
||||
return nil, diag.Errorf(`the bundle is configured to upload artifacts to %s but a
|
||||
UC volume at %s does not exist. Note: We detected that you have a UC volume
|
||||
defined that matched the path above at %s. Please deploy the UC volume
|
||||
in a separate deployment before using it in as a destination to upload
|
||||
artifacts.`, uploadPath, volumePath, l)
|
||||
}
|
||||
|
||||
func locationForVolume(b *bundle.Bundle, catalogName, schemaName, volumeName string) (dyn.Location, bool) {
|
||||
|
|
|
@ -40,17 +40,7 @@ func TestParseTerraformActions(t *testing.T) {
|
|||
},
|
||||
}
|
||||
|
||||
res := filterDeleteOrRecreateActions(changes, func(typ string, actions tfjson.Actions) bool {
|
||||
if typ != "databricks_pipeline" {
|
||||
return false
|
||||
}
|
||||
|
||||
if actions.Delete() || actions.Replace() {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
})
|
||||
res := filterDeleteOrRecreateActions(changes, "databricks_pipeline")
|
||||
|
||||
assert.Equal(t, []terraformlib.Action{
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue