Commit 41712d7
authored
PRODENG-3148 mcr version detect cleanup (#599)
- go-version no longer throws a runtime error on invalid versions, so we
can drop our custom error catch version detection function
NOTE
What is this: we had issues when we first started analyzing the mcr version in
the configuration, as some invalid values would produce a runtime error. The
error came right out of hashicorps go-version library, so our only option
was to wrap the function and catch any runtime errors.
We also included a unit test which validated that a proper error was returned
on the invalid version value, to confirm in unit testing that the runtime
error was caught
Why isn't it needed anymore: I ran the go-version function recently without the
wrapper and found that the runtime exception no longer occurs, meaning that
our wrapper is no longer needed. The unit test now runs without exception
without the wrapper.
Signed-off-by: James Nesbitt <[email protected]>1 parent 83ec222 commit 41712d7
1 file changed
+1
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
0 commit comments