2024-03-21 10:37:05 +00:00
|
|
|
package config_tests
|
2023-11-29 13:20:13 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
)
|
|
|
|
|
2024-03-18 16:23:39 +00:00
|
|
|
func TestExpandPipelineGlobPaths(t *testing.T) {
|
2024-08-20 12:54:56 +00:00
|
|
|
b, diags := initializeTarget(t, "./pipeline_glob_paths", "default")
|
2024-03-25 14:18:47 +00:00
|
|
|
require.NoError(t, diags.Error())
|
2023-11-29 13:20:13 +00:00
|
|
|
require.Equal(
|
|
|
|
t,
|
2024-10-02 15:34:00 +00:00
|
|
|
"/Workspace/Users/user@domain.com/.bundle/pipeline_glob_paths/default/files/dlt/nyc_taxi_loader",
|
2024-03-18 16:23:39 +00:00
|
|
|
b.Config.Resources.Pipelines["nyc_taxi_pipeline"].Libraries[0].Notebook.Path,
|
2023-11-29 13:20:13 +00:00
|
|
|
)
|
|
|
|
}
|
2024-03-18 16:23:39 +00:00
|
|
|
|
|
|
|
func TestExpandPipelineGlobPathsWithNonExistent(t *testing.T) {
|
2024-08-20 12:54:56 +00:00
|
|
|
_, diags := initializeTarget(t, "./pipeline_glob_paths", "error")
|
2024-03-25 14:18:47 +00:00
|
|
|
require.ErrorContains(t, diags.Error(), "notebook ./non-existent not found")
|
2024-03-18 16:23:39 +00:00
|
|
|
}
|