...
1 package bootstrap
2
3 import (
4 "testing"
5
6 "github.com/stretchr/testify/assert"
7 )
8
9 func TestSupportsFluxV024(t *testing.T) {
10
11 testcases := []struct {
12 title string
13 storeVersion string
14 expected bool
15 }{
16 {
17 title: "Case 1 - Larger than static version",
18 storeVersion: "0.20.9",
19 expected: true,
20 },
21 {
22 title: "Case 1 - Same as static version",
23 storeVersion: "0.20.8",
24 expected: true,
25 },
26 {
27 title: "Case 1 - Less than static version",
28 storeVersion: "0.20.2",
29 expected: false,
30 },
31 }
32 for _, testcase := range testcases {
33 supports := SupportsFluxV024(testcase.storeVersion)
34 assert.Equal(t, testcase.expected, supports)
35 }
36 }
37
View as plain text