File tree Expand file tree Collapse file tree 1 file changed +7
-20
lines changed Expand file tree Collapse file tree 1 file changed +7
-20
lines changed Original file line number Diff line number Diff line change @@ -904,27 +904,14 @@ func TestListWorkspaces(t *testing.T) {
904904}
905905
906906func TestWorkspace_WaitForResolve_Failure (t * testing.T ) {
907- qa .HTTPFixturesApply (t , []qa.HTTPFixture {
908- {
909- Method : "GET" ,
910- Resource : "/api/2.0/accounts/abc/workspaces/1234" ,
911- ReuseRequest : true ,
912- Response : Workspace {
913- AccountID : "abc" ,
914- WorkspaceID : 1234 ,
915- WorkspaceStatus : "RUNNING" ,
916- WorkspaceURL : "https://foo-bar-baz.cloud.databricks.com" ,
917- },
918- },
919- }, func (ctx context.Context , client * common.DatabricksClient ) {
907+ qa .HTTPFixturesApply (t , []qa.HTTPFixture {},
908+ func (ctx context.Context , client * common.DatabricksClient ) {
920909 a := NewWorkspacesAPI (ctx , client )
921- err := a .WaitForRunning (Workspace {
922- AccountID : "abc" ,
923- WorkspaceID : 1234 ,
924- }, 1 * time .Second )
925- assert .EqualError (t , err , "workspace https://foo-bar-baz.cloud.databricks.com is not yet reachable:" +
926- " Get \" https://foo-bar-baz.cloud.databricks.com/api/2.0/token/list\" : " +
927- "dial tcp: lookup foo-bar-baz.cloud.databricks.com: no such host" )
910+ rerr := a .verifyWorkspaceReachable (Workspace {
911+ WorkspaceURL : "https://900150983cd24fb0.cloud.databricks.com" ,
912+ })
913+ assert .NotNil (t , rerr )
914+ assert .True (t , rerr .Retryable )
928915 })
929916}
930917
You can’t perform that action at this time.
0 commit comments