@cryptotaxi247 / kubo / commits / 38b21e429

remove test for removed dead config version fields

License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>

Jeromy committed Apr 8, 2016 at 13:54 UTC 38b21e42960a1071eb213254419f6f96b7fa1bde
1 file changed -35
repo/config/version_test.go deleted
-35
@@ -1,35 +0,0 @@
1 -package config
2 -
3 -import (
4 - "encoding/json"
5 - "strings"
6 - "testing"
7 -)
8 -
9 -func TestAutoUpdateValues(t *testing.T) {
10 - var tval struct {
11 - AutoUpdate AutoUpdateSetting
12 - }
13 - tests := []struct {
14 - input string
15 - val AutoUpdateSetting
16 - err error
17 - }{
18 - {`{"hello":123}`, AutoUpdateNever, nil}, // zero value
19 - {`{"AutoUpdate": "never"}`, AutoUpdateNever, nil},
20 - {`{"AutoUpdate": "patch"}`, AutoUpdatePatch, nil},
21 - {`{"AutoUpdate": "minor"}`, AutoUpdateMinor, nil},
22 - {`{"AutoUpdate": "major"}`, AutoUpdateMajor, nil},
23 - {`{"AutoUpdate": "blarg"}`, AutoUpdateMinor, ErrUnknownAutoUpdateSetting},
24 - }
25 -
26 - for i, tc := range tests {
27 - if err := json.NewDecoder(strings.NewReader(tc.input)).Decode(&tval); err != tc.err {
28 - t.Fatalf("%d failed - got err %q wanted %v", i, err, tc.err)
29 - }
30 -
31 - if tval.AutoUpdate != tc.val {
32 - t.Fatalf("%d failed - got val %q where we wanted %q", i, tval.AutoUpdate, tc.val)
33 - }
34 - }
35 -}