File: deploy_test.go

package info (click to toggle)
tiup 1.16.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,384 kB
  • sloc: sh: 1,988; makefile: 138; sql: 16
file content (27 lines) | stat: -rw-r--r-- 417 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package command

import (
	"testing"

	"github.com/stretchr/testify/require"
)

func TestSupportVersion(t *testing.T) {
	assert := require.New(t)

	tests := map[string]bool{ // version to support or not
		"v2.0.0": true,
		"v6.0.0": true,
		"v1.0.1": false,
		"v1.1.1": false,
	}

	for v, support := range tests {
		err := supportVersion(v)
		if support {
			assert.Nil(err)
		} else {
			assert.NotNil(err)
		}
	}
}