Skip to content

Commit 8db2e7b

Browse files
authored
Move default handlers from acceptance/internal to libs/testserver (#3495)
## Changes - Move acceptance/internal/handlers.go to libs/testserver/handlers.go - Pure move, no other changes. ## Why The testserver package is useful outside of acceptance test as an alternative to mocking the client. Default handlers could be useful as well. I plan add a few unit tests for terranova/resources and those require a client.
1 parent ce47a62 commit 8db2e7b

File tree

2 files changed

+128
-130
lines changed

2 files changed

+128
-130
lines changed

acceptance/internal/prepare_server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727

2828
func StartDefaultServer(t *testing.T) {
2929
s := testserver.New(t)
30-
addDefaultHandlers(s)
30+
testserver.AddDefaultHandlers(s)
3131

3232
t.Setenv("DATABRICKS_DEFAULT_HOST", s.URL)
3333

@@ -174,7 +174,7 @@ func startLocalServer(t *testing.T,
174174
}
175175

176176
// The earliest handlers take precedence, add default handlers last
177-
addDefaultHandlers(s)
177+
testserver.AddDefaultHandlers(s)
178178
return s.URL
179179
}
180180

0 commit comments

Comments
 (0)