(t *testing.T)
| 159 | } |
| 160 | |
| 161 | func Test_ValidateValue(t *testing.T) { |
| 162 | err := ValidateValue("git_protocol", "sshpps") |
| 163 | assert.EqualError(t, err, "invalid value") |
| 164 | |
| 165 | err = ValidateValue("git_protocol", "ssh") |
| 166 | assert.NoError(t, err) |
| 167 | |
| 168 | err = ValidateValue("editor", "vim") |
| 169 | assert.NoError(t, err) |
| 170 | |
| 171 | err = ValidateValue("got", "123") |
| 172 | assert.NoError(t, err) |
| 173 | |
| 174 | err = ValidateValue("http_unix_socket", "really_anything/is/allowed/and/net.Dial\\(...\\)/will/ultimately/validate") |
| 175 | assert.NoError(t, err) |
| 176 | } |
| 177 | |
| 178 | func Test_ValidateKey(t *testing.T) { |
| 179 | err := ValidateKey("invalid") |
nothing calls this directly
no test coverage detected