2024-04-22 11:44:34 +00:00
|
|
|
package config_tests
|
|
|
|
|
|
|
|
import (
|
2024-05-21 10:00:04 +00:00
|
|
|
"context"
|
2024-04-22 11:44:34 +00:00
|
|
|
"testing"
|
|
|
|
|
2024-05-21 10:00:04 +00:00
|
|
|
"github.com/databricks/cli/bundle"
|
|
|
|
"github.com/databricks/cli/bundle/libraries"
|
2024-04-22 11:44:34 +00:00
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestEnvironmentKeySupported(t *testing.T) {
|
|
|
|
_, diags := loadTargetWithDiags("./python_wheel/environment_key", "default")
|
|
|
|
require.Empty(t, diags)
|
|
|
|
}
|
2024-05-21 10:00:04 +00:00
|
|
|
|
|
|
|
func TestEnvironmentKeyProvidedAndNoPanic(t *testing.T) {
|
|
|
|
b, diags := loadTargetWithDiags("./environment_key_only", "default")
|
|
|
|
require.Empty(t, diags)
|
|
|
|
|
2024-08-14 09:03:44 +00:00
|
|
|
diags = bundle.Apply(context.Background(), b, libraries.ExpandGlobReferences())
|
2024-05-21 10:00:04 +00:00
|
|
|
require.Empty(t, diags)
|
|
|
|
}
|