databricks-cli/bundle/tests/include_default_test.go

21 lines
535 B
Go
Raw Normal View History

package config_tests
import (
"sort"
"testing"
"github.com/stretchr/testify/assert"
"golang.org/x/exp/maps"
)
func TestIncludeDefault(t *testing.T) {
b := load(t, "./include_default")
2022-12-01 08:35:21 +00:00
// Test that both workflows were loaded.
keys := maps.Keys(b.Config.Resources.Workflows)
sort.Strings(keys)
2022-12-01 08:35:21 +00:00
assert.Equal(t, []string{"my_first_workflow", "my_second_workflow"}, keys)
assert.Equal(t, "1", b.Config.Resources.Workflows["my_first_workflow"].ID)
assert.Equal(t, "2", b.Config.Resources.Workflows["my_second_workflow"].ID)
}