mirror of https://github.com/databricks/cli.git
Added test to verify scripts.Execute mutator works correctly (#1237)
## Changes Follow up to https://github.com/databricks/cli/pull/1232
This commit is contained in:
parent
fb8f415e29
commit
0839e6f66a
|
@ -34,3 +34,18 @@ func TestExecutesHook(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
require.Equal(t, "Hello", strings.TrimSpace(line))
|
||||
}
|
||||
|
||||
func TestExecuteMutator(t *testing.T) {
|
||||
b := &bundle.Bundle{
|
||||
Config: config.Root{
|
||||
Experimental: &config.Experimental{
|
||||
Scripts: map[config.ScriptHook]config.Command{
|
||||
config.ScriptPreBuild: "echo 'Hello'",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
err := bundle.Apply(context.Background(), b, Execute(config.ScriptPreInit))
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue