Fix TestAccBundleInitOnMlopsStacks to work on aws-prod-ucws (#1283)

## Changes
aws-prod-ucws has CLOUD_ENV set to "ucws" which was failing the
validation checks in the template itself. This PR fixes the test.

## Tests
The tests pass now
This commit is contained in:
shreyas-goenka 2024-03-13 18:29:49 +05:30 committed by GitHub
parent d4329f470f
commit 5f29b5ecd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -7,6 +7,7 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"strconv" "strconv"
"strings"
"testing" "testing"
"github.com/databricks/cli/bundle/config" "github.com/databricks/cli/bundle/config"
@ -39,7 +40,8 @@ func TestAccBundleInitErrorOnUnknownFields(t *testing.T) {
// skip this test until the MLOps Stacks DAB is updated to work again. // skip this test until the MLOps Stacks DAB is updated to work again.
func TestAccBundleInitOnMlopsStacks(t *testing.T) { func TestAccBundleInitOnMlopsStacks(t *testing.T) {
t.Parallel() t.Parallel()
env := GetEnvOrSkipTest(t, "CLOUD_ENV") env := testutil.GetCloud(t).String()
tmpDir1 := t.TempDir() tmpDir1 := t.TempDir()
tmpDir2 := t.TempDir() tmpDir2 := t.TempDir()
@ -53,7 +55,7 @@ func TestAccBundleInitOnMlopsStacks(t *testing.T) {
"input_project_name": projectName, "input_project_name": projectName,
"input_root_dir": "repo_name", "input_root_dir": "repo_name",
"input_include_models_in_unity_catalog": "no", "input_include_models_in_unity_catalog": "no",
"input_cloud": env, "input_cloud": strings.ToLower(env),
} }
b, err := json.Marshal(initConfig) b, err := json.Marshal(initConfig)
require.NoError(t, err) require.NoError(t, err)