(t *testing.T)
| 26 | ) |
| 27 | |
| 28 | func TestNewCloudUpgrade(t *testing.T) { |
| 29 | assert := assert.New(t) |
| 30 | |
| 31 | cmd := NewCloudUpgrade() |
| 32 | |
| 33 | assert.Equal(cmd.Use, "cloud") |
| 34 | assert.Equal(cmd.Short, "Upgrade the cloud components") |
| 35 | assert.Equal(cmd.Long, "Upgrade the cloud components to the desired version, "+ |
| 36 | "it uses helm to upgrade the installed release of cloudcore chart, which includes all the cloud components") |
| 37 | assert.NotNil(cmd.RunE) |
| 38 | |
| 39 | flag := cmd.Flags().Lookup(types.FlagNameKubeEdgeVersion) |
| 40 | assert.NotNil(flag) |
| 41 | assert.Equal("", flag.DefValue) |
| 42 | assert.Equal(types.FlagNameKubeEdgeVersion, flag.Name) |
| 43 | |
| 44 | flag = cmd.Flags().Lookup(types.FlagNameAdvertiseAddress) |
| 45 | assert.NotNil(flag) |
| 46 | assert.Equal("", flag.DefValue) |
| 47 | assert.Equal(types.FlagNameAdvertiseAddress, flag.Name) |
| 48 | } |
| 49 | |
| 50 | func TestNewCloudUpgradeOptions(t *testing.T) { |
| 51 | assert := assert.New(t) |
nothing calls this directly
no test coverage detected