99 "strings"
1010 "testing"
1111
12- "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
12+ sdkretry "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
1313 "github.com/hashicorp/terraform-provider-aws/internal/tfresource"
1414)
1515
@@ -31,7 +31,7 @@ func TestNotFound(t *testing.T) {
3131 },
3232 {
3333 Name : "not found error" ,
34- Err : & retry .NotFoundError {LastError : errors .New ("test" )},
34+ Err : & sdkretry .NotFoundError {LastError : errors .New ("test" )},
3535 Expected : true ,
3636 },
3737 {
@@ -40,7 +40,7 @@ func TestNotFound(t *testing.T) {
4040 },
4141 {
4242 Name : "wrapped not found error" ,
43- Err : fmt .Errorf ("test: %w" , & retry .NotFoundError {LastError : errors .New ("test" )}),
43+ Err : fmt .Errorf ("test: %w" , & sdkretry .NotFoundError {LastError : errors .New ("test" )}),
4444 Expected : true ,
4545 },
4646 }
@@ -76,24 +76,24 @@ func TestTimedOut(t *testing.T) {
7676 },
7777 {
7878 Name : "timeout error" ,
79- Err : & retry .TimeoutError {},
79+ Err : & sdkretry .TimeoutError {},
8080 Expected : true ,
8181 },
8282 {
8383 Name : "timeout error non-nil last error" ,
84- Err : & retry .TimeoutError {LastError : errors .New ("test" )},
84+ Err : & sdkretry .TimeoutError {LastError : errors .New ("test" )},
8585 },
8686 {
8787 Name : "wrapped other error" ,
8888 Err : fmt .Errorf ("test: %w" , errors .New ("test" )),
8989 },
9090 {
9191 Name : "wrapped timeout error" ,
92- Err : fmt .Errorf ("test: %w" , & retry .TimeoutError {}),
92+ Err : fmt .Errorf ("test: %w" , & sdkretry .TimeoutError {}),
9393 },
9494 {
9595 Name : "wrapped timeout error non-nil last error" ,
96- Err : fmt .Errorf ("test: %w" , & retry .TimeoutError {LastError : errors .New ("test" )}),
96+ Err : fmt .Errorf ("test: %w" , & sdkretry .TimeoutError {LastError : errors .New ("test" )}),
9797 },
9898 }
9999
@@ -129,40 +129,40 @@ func TestSetLastError(t *testing.T) {
129129 },
130130 {
131131 Name : "timeout error lastErr is nil" ,
132- Err : & retry .TimeoutError {},
132+ Err : & sdkretry .TimeoutError {},
133133 },
134134 {
135135 Name : "timeout error" ,
136- Err : & retry .TimeoutError {},
136+ Err : & sdkretry .TimeoutError {},
137137 LastErr : errors .New ("lasttest" ),
138138 Expected : true ,
139139 },
140140 {
141141 Name : "timeout error non-nil last error lastErr is nil" ,
142- Err : & retry .TimeoutError {LastError : errors .New ("test" )},
142+ Err : & sdkretry .TimeoutError {LastError : errors .New ("test" )},
143143 },
144144 {
145145 Name : "timeout error non-nil last error no overwrite" ,
146- Err : & retry .TimeoutError {LastError : errors .New ("test" )},
146+ Err : & sdkretry .TimeoutError {LastError : errors .New ("test" )},
147147 LastErr : errors .New ("lasttest" ),
148148 },
149149 {
150150 Name : "unexpected state error lastErr is nil" ,
151- Err : & retry .UnexpectedStateError {},
151+ Err : & sdkretry .UnexpectedStateError {},
152152 },
153153 {
154154 Name : "unexpected state error" ,
155- Err : & retry .UnexpectedStateError {},
155+ Err : & sdkretry .UnexpectedStateError {},
156156 LastErr : errors .New ("lasttest" ),
157157 Expected : true ,
158158 },
159159 {
160160 Name : "unexpected state error non-nil last error lastErr is nil" ,
161- Err : & retry .UnexpectedStateError {LastError : errors .New ("test" )},
161+ Err : & sdkretry .UnexpectedStateError {LastError : errors .New ("test" )},
162162 },
163163 {
164164 Name : "unexpected state error non-nil last error no overwrite" ,
165- Err : & retry .UnexpectedStateError {LastError : errors .New ("test" )},
165+ Err : & sdkretry .UnexpectedStateError {LastError : errors .New ("test" )},
166166 LastErr : errors .New ("lasttest" ),
167167 },
168168 }
0 commit comments