@@ -2,7 +2,7 @@ package core_test
22
33import (
44 "context"
5- "fmt "
5+ "errors "
66 "reflect"
77 "testing"
88 "time"
@@ -115,7 +115,7 @@ func Test_handleUnmarshalErrors(t *testing.T) {
115115 Check : core .TestCheckCombine (
116116 core .TestCheckExitCode (1 ),
117117 core .TestCheckError (& core.CliError {
118- Err : fmt . Errorf ("invalid argument 'name_id': arg name must only contain lowercase letters, numbers or dashes" ),
118+ Err : errors . New ("invalid argument 'name_id': arg name must only contain lowercase letters, numbers or dashes" ),
119119 Hint : "Valid arguments are: name-id" ,
120120 }),
121121 ),
@@ -127,7 +127,7 @@ func Test_handleUnmarshalErrors(t *testing.T) {
127127 Check : core .TestCheckCombine (
128128 core .TestCheckExitCode (1 ),
129129 core .TestCheckError (& core.CliError {
130- Err : fmt . Errorf ("invalid argument 'ubuntu_focal': arg name must only contain lowercase letters, numbers or dashes" ),
130+ Err : errors . New ("invalid argument 'ubuntu_focal': arg name must only contain lowercase letters, numbers or dashes" ),
131131 Hint : "Valid arguments are: name-id" ,
132132 }),
133133 ),
@@ -143,7 +143,7 @@ func Test_handleUnmarshalErrors(t *testing.T) {
143143 Details : `Absolute time error: parsing time "+3R" as "2006-01-02T15:04:05Z07:00": cannot parse "+3R" as "2006"
144144Relative time error: unknown unit in duration: "R"
145145` ,
146- Err : fmt . Errorf ("date parsing error: +3R" ),
146+ Err : errors . New ("date parsing error: +3R" ),
147147 Hint : "Run `scw help date` to learn more about date parsing" ,
148148 }),
149149 ),
@@ -177,7 +177,7 @@ func Test_PositionalArg(t *testing.T) {
177177 Check : core .TestCheckCombine (
178178 core .TestCheckExitCode (1 ),
179179 core .TestCheckError (& core.CliError {
180- Err : fmt . Errorf ("a positional argument is required for this command" ),
180+ Err : errors . New ("a positional argument is required for this command" ),
181181 Hint : "Try running: scw test positional <name-id>" ,
182182 }),
183183 ),
@@ -189,7 +189,7 @@ func Test_PositionalArg(t *testing.T) {
189189 Check : core .TestCheckCombine (
190190 core .TestCheckExitCode (1 ),
191191 core .TestCheckError (& core.CliError {
192- Err : fmt . Errorf ("a positional argument is required for this command" ),
192+ Err : errors . New ("a positional argument is required for this command" ),
193193 Hint : "Try running: scw test positional <name-id> tag=world" ,
194194 }),
195195 ),
@@ -201,7 +201,7 @@ func Test_PositionalArg(t *testing.T) {
201201 Check : core .TestCheckCombine (
202202 core .TestCheckExitCode (1 ),
203203 core .TestCheckError (& core.CliError {
204- Err : fmt . Errorf ("a positional argument is required for this command" ),
204+ Err : errors . New ("a positional argument is required for this command" ),
205205 Hint : "Try running: scw test positional plop tag=world" ,
206206 }),
207207 ),
@@ -213,7 +213,7 @@ func Test_PositionalArg(t *testing.T) {
213213 Check : core .TestCheckCombine (
214214 core .TestCheckExitCode (1 ),
215215 core .TestCheckError (& core.CliError {
216- Err : fmt . Errorf ("a positional argument is required for this command" ),
216+ Err : errors . New ("a positional argument is required for this command" ),
217217 Hint : "Try running: scw test positional plop tag=world" ,
218218 }),
219219 ),
@@ -225,7 +225,7 @@ func Test_PositionalArg(t *testing.T) {
225225 Check : core .TestCheckCombine (
226226 core .TestCheckExitCode (1 ),
227227 core .TestCheckError (& core.CliError {
228- Err : fmt . Errorf ("a positional argument is required for this command" ),
228+ Err : errors . New ("a positional argument is required for this command" ),
229229 Hint : "Try running: scw test positional plop" ,
230230 }),
231231 ),
@@ -311,7 +311,7 @@ func Test_MultiPositionalArg(t *testing.T) {
311311 Check : core .TestCheckCombine (
312312 core .TestCheckExitCode (1 ),
313313 core .TestCheckError (& core.CliError {
314- Err : fmt . Errorf ("a positional argument is required for this command" ),
314+ Err : errors . New ("a positional argument is required for this command" ),
315315 Hint : "Try running: scw test multi-positional <name-ids> tag=tag1" ,
316316 }),
317317 ),
0 commit comments