@@ -222,6 +222,17 @@ func TestClusterNameFromID(t *testing.T) {
222222 assert .Equal (t , "c" , resourcesMap ["databricks_cluster" ].Name (ic , d ))
223223}
224224
225+ func TestRepoName (t * testing.T ) {
226+ ic := importContextForTest ()
227+ d := repos .ResourceRepo ().TestResourceData ()
228+ d .SetId ("12345" )
229+ // Repo without path
230+ assert .Equal (t , "repo_12345" , resourcesMap ["databricks_repo" ].Name (ic , d ))
231+ // Repo with path
232+ d .Set ("path" , "/Repos/user/test" )
233+ assert .Equal (t , "user_test_12345" , resourcesMap ["databricks_repo" ].Name (ic , d ))
234+ }
235+
225236func TestJobName (t * testing.T ) {
226237 ic := importContextForTest ()
227238 d := jobs .ResourceJob ().TestResourceData ()
@@ -775,13 +786,6 @@ func TestGlobalInitScriptsBodyErrors(t *testing.T) {
775786 })
776787}
777788
778- func TestRepoIdForName (t * testing.T ) {
779- d := repos .ResourceRepo ().TestResourceData ()
780- d .SetId ("x" )
781- ic := importContextForTest ()
782- assert .Equal (t , "x" , resourcesMap ["databricks_repo" ].Name (ic , d ))
783- }
784-
785789func TestRepoListFails (t * testing.T ) {
786790 qa .HTTPFixturesApply (t , []qa.HTTPFixture {
787791 {
0 commit comments