MCPcopy
hub / github.com/IBM/sarama / TestVersionParsing

Function TestVersionParsing

utils_test.go:34–100  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

32}
33
34func TestVersionParsing(t *testing.T) {
35 validVersions := []string{
36 "0.8.2.0",
37 "0.8.2.1",
38 "0.8.2.2",
39 "0.9.0.0",
40 "0.9.0.1",
41 "0.10.0.0",
42 "0.10.0.1",
43 "0.10.1.0",
44 "0.10.1.1",
45 "0.10.2.0",
46 "0.10.2.1",
47 "0.10.2.2",
48 "0.11.0.0",
49 "0.11.0.1",
50 "0.11.0.2",
51 "1.0.0",
52 "1.0.1",
53 "1.0.2",
54 "1.1.0",
55 "1.1.1",
56 "2.0.0",
57 "2.0.1",
58 "2.1.0",
59 "2.1.1",
60 "2.2.0",
61 "2.2.1",
62 "2.2.2",
63 "2.3.0",
64 "2.3.1",
65 "2.4.0",
66 "2.4.1",
67 "2.5.0",
68 "2.5.1",
69 "2.6.0",
70 "2.6.1",
71 "2.6.2",
72 "2.6.3",
73 "2.7.0",
74 "2.7.1",
75 "2.7.2",
76 "2.8.0",
77 "2.8.1",
78 "3.0.0",
79 "3.0.1",
80 "3.1.0",
81 "3.1.1",
82 "3.2.0",
83 }
84 for _, s := range validVersions {
85 v, err := ParseKafkaVersion(s)
86 if err != nil {
87 t.Errorf("could not parse valid version %s: %s", s, err)
88 }
89 if v.String() != s {
90 t.Errorf("version %s != %s", v.String(), s)
91 }

Callers

nothing calls this directly

Calls 3

ParseKafkaVersionFunction · 0.85
ErrorfMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected