| 1 | package cmdscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ |
| 2 | |
| 3 | import ( |
| 4 | "stringsscip-go gomod github.com/golang/go/src . strings/" |
| 5 | "testingscip-go gomod github.com/golang/go/src . testing/" |
| 6 | |
| 7 | "github.com/stretchr/testify/assertscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/" |
| 8 | ) |
| 9 | |
| 10 | // TestExitError_Error tests the Error() method of ExitError. |
| 11 | // |
| 12 | |
| 13 | func TestExitError_Errorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/TestExitError_Error().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) { |
| 14 | t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().() |
| 15 | |
| 16 | tests := []struct { |
| 17 | name string |
| 18 | e ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError# |
| 19 | want string |
| 20 | }{ |
| 21 | { |
| 22 | name: "empty message", |
| 23 | e: ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#{ExitCodescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#ExitCode.: ExSuccessscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExSuccess., Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Message.: ""}, |
| 24 | want: "", |
| 25 | }, |
| 26 | { |
| 27 | name: "usage error with invalid flag", |
| 28 | e: ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#{ExitCodescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#ExitCode.: ExUsagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExUsage., Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Message.: "invalid flag"}, |
| 29 | want: "invalid flag", |
| 30 | }, |
| 31 | { |
| 32 | name: "config error with missing token", |
| 33 | e: ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#{ExitCodescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#ExitCode.: ExConfigscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExConfig., Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Message.: "missing token"}, |
| 34 | want: "missing token", |
| 35 | }, |
| 36 | { |
| 37 | name: "unicode message", |
| 38 | e: ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#{ExitCodescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#ExitCode.: ExUnavailablescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExUnavailable., Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Message.: "通知错误"}, |
| 39 | want: "通知错误", |
| 40 | }, |
| 41 | { |
| 42 | name: "long message", |
| 43 | e: ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#{ExitCodescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#ExitCode.: ExUsagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExUsage., Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Message.: stringsscip-go gomod github.com/golang/go/src . strings/.Repeatscip-go gomod github.com/golang/go/src . strings/Repeat().("a", 1000)}, |
| 44 | want: stringsscip-go gomod github.com/golang/go/src . strings/.Repeatscip-go gomod github.com/golang/go/src . strings/Repeat().("a", 1000), |
| 45 | }, |
| 46 | } |
| 47 | |
| 48 | for _, tt := range tests { |
| 49 | t.Runscip-go gomod github.com/golang/go/src . testing/T#Run().(tt.name, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) { |
| 50 | t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().() |
| 51 | |
| 52 | got := tt.e.Errorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Error().() |
| 53 | assertscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/Equal().(t, tt.want, got, "ExitError.Error() returned unexpected value") |
| 54 | }) |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | // TestExitError_Error_ImplementsInterface verifies ExitError implements the error interface. |
| 59 | func TestExitError_Error_ImplementsInterfacescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/TestExitError_Error_ImplementsInterface().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) { |
| 60 | t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().() |
| 61 | |
| 62 | // Verify ExitError implements error interface |
| 63 | var _ error = ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#{ExitCodescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#ExitCode.: ExSuccessscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExSuccess., Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Message.: "test"} |
| 64 | |
| 65 | // Verify error interface methods work correctly |
| 66 | err := ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#{ExitCodescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#ExitCode.: ExConfigscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExConfig., Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Message.: "interface test"} |
| 67 | assertscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/Equal().(t, "interface test", err.Errorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Error().()) |
| 68 | } |
| 69 | |
| 70 | // TestInvalidUsage tests the InvalidUsage() factory function. |
| 71 | func TestInvalidUsagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/TestInvalidUsage().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) { |
| 72 | t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().() |
| 73 | |
| 74 | tests := []struct { |
| 75 | name string |
| 76 | message string |
| 77 | want ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError# |
| 78 | }{ |
| 79 | { |
| 80 | name: "simple message with bad args", |
| 81 | message: "bad args", |
| 82 | want: ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#{ExitCodescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#ExitCode.: ExUsagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExUsage., Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Message.: "bad args"}, |
| 83 | }, |
| 84 | { |
| 85 | name: "empty message", |
| 86 | message: "", |
| 87 | want: ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#{ExitCodescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#ExitCode.: ExUsagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExUsage., Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Message.: ""}, |
| 88 | }, |
| 89 | { |
| 90 | name: "message with formatting usage", |
| 91 | message: "usage: cmd --flag", |
| 92 | want: ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#{ExitCodescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#ExitCode.: ExUsagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExUsage., Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Message.: "usage: cmd --flag"}, |
| 93 | }, |
| 94 | { |
| 95 | name: "message with special characters", |
| 96 | message: "error: $VAR & | pipe", |
| 97 | want: ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#{ExitCodescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#ExitCode.: ExUsagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExUsage., Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Message.: "error: $VAR & | pipe"}, |
| 98 | }, |
| 99 | } |
| 100 | |
| 101 | for _, tt := range tests { |
| 102 | t.Runscip-go gomod github.com/golang/go/src . testing/T#Run().(tt.name, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) { |
| 103 | t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().() |
| 104 | |
| 105 | got := InvalidUsagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/InvalidUsage().(tt.message) |
| 106 | assertscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/Equal().(t, tt.want, got, "InvalidUsage() returned unexpected ExitError") |
| 107 | assertscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/Equal().(t, ExUsagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExUsage., got.ExitCodescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#ExitCode., "InvalidUsage() should have ExitCode ExUsage") |
| 108 | assertscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/Equal().(t, tt.message, got.Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Message., "InvalidUsage() should preserve message") |
| 109 | }) |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | // TestTaskUnavailable tests the TaskUnavailable() factory function. |
| 114 | func TestTaskUnavailablescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/TestTaskUnavailable().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) { |
| 115 | t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().() |
| 116 | |
| 117 | tests := []struct { |
| 118 | name string |
| 119 | message string |
| 120 | want ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError# |
| 121 | }{ |
| 122 | { |
| 123 | name: "service down with smtp server unreachable", |
| 124 | message: "smtp server unreachable", |
| 125 | want: ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#{ExitCodescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#ExitCode.: ExUnavailablescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExUnavailable., Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Message.: "smtp server unreachable"}, |
| 126 | }, |
| 127 | { |
| 128 | name: "network error with connection timeout", |
| 129 | message: "connection timeout", |
| 130 | want: ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#{ExitCodescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#ExitCode.: ExUnavailablescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExUnavailable., Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Message.: "connection timeout"}, |
| 131 | }, |
| 132 | { |
| 133 | name: "empty message", |
| 134 | message: "", |
| 135 | want: ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#{ExitCodescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#ExitCode.: ExUnavailablescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExUnavailable., Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Message.: ""}, |
| 136 | }, |
| 137 | } |
| 138 | |
| 139 | for _, tt := range tests { |
| 140 | t.Runscip-go gomod github.com/golang/go/src . testing/T#Run().(tt.name, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) { |
| 141 | t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().() |
| 142 | |
| 143 | got := TaskUnavailablescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/TaskUnavailable().(tt.message) |
| 144 | assertscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/Equal().(t, tt.want, got, "TaskUnavailable() returned unexpected ExitError") |
| 145 | assertscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/Equal().(t, ExUnavailablescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExUnavailable., got.ExitCodescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#ExitCode., "TaskUnavailable() should have ExitCode ExUnavailable") |
| 146 | assertscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/Equal().(t, tt.message, got.Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Message., "TaskUnavailable() should preserve message") |
| 147 | }) |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | // TestConfigurationError tests the ConfigurationError() factory function. |
| 152 | func TestConfigurationErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/TestConfigurationError().(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) { |
| 153 | t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().() |
| 154 | |
| 155 | tests := []struct { |
| 156 | name string |
| 157 | message string |
| 158 | want ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError# |
| 159 | }{ |
| 160 | { |
| 161 | name: "missing token for discord", |
| 162 | message: "discord: missing webhook", |
| 163 | want: ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#{ExitCodescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#ExitCode.: ExConfigscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExConfig., Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Message.: "discord: missing webhook"}, |
| 164 | }, |
| 165 | { |
| 166 | name: "invalid URL with parse error", |
| 167 | message: "parse error: scheme", |
| 168 | want: ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#{ExitCodescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#ExitCode.: ExConfigscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExConfig., Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Message.: "parse error: scheme"}, |
| 169 | }, |
| 170 | { |
| 171 | name: "empty message", |
| 172 | message: "", |
| 173 | want: ExitErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#{ExitCodescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#ExitCode.: ExConfigscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExConfig., Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Message.: ""}, |
| 174 | }, |
| 175 | } |
| 176 | |
| 177 | for _, tt := range tests { |
| 178 | t.Runscip-go gomod github.com/golang/go/src . testing/T#Run().(tt.name, func(t *testingscip-go gomod github.com/golang/go/src . testing/.Tscip-go gomod github.com/golang/go/src . testing/T#) { |
| 179 | t.Parallelscip-go gomod github.com/golang/go/src . testing/T#Parallel().() |
| 180 | |
| 181 | got := ConfigurationErrorscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ConfigurationError().(tt.message) |
| 182 | assertscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/Equal().(t, tt.want, got, "ConfigurationError() returned unexpected ExitError") |
| 183 | assertscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/Equal().(t, ExConfigscip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExConfig., got.ExitCodescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#ExitCode., "ConfigurationError() should have ExitCode ExConfig") |
| 184 | assertscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.12.1 `github.com/stretchr/testify/assert`/Equal().(t, tt.message, got.Messagescip-go gomod github.com/nicholas-fedor/shoutrrr . `github.com/nicholas-fedor/shoutrrr/shoutrrr/cmd`/ExitError#Message., "ConfigurationError() should preserve message") |
| 185 | }) |
| 186 | } |
| 187 | } |