Replicate most of drone-helm's config

This commit is contained in:
Erin Call
2019-12-09 09:56:02 -08:00
parent 238ede6f9e
commit e3051ec72e
12 changed files with 277 additions and 62 deletions

View File

@@ -0,0 +1,28 @@
package helm
import (
"github.com/stretchr/testify/suite"
"testing"
)
type ConfigTestSuite struct {
suite.Suite
}
func TestConfigTestSuite(t *testing.T) {
suite.Run(t, new(ConfigTestSuite))
}
func (suite *ConfigTestSuite) TestHelmCommandDecodeSuccess() {
cmd := HelmCommand("")
err := cmd.Decode("upgrade")
suite.Require().Nil(err)
suite.EqualValues(cmd, "upgrade")
}
func (suite *ConfigTestSuite) TestHelmCommandDecodeFailure() {
cmd := HelmCommand("")
err := cmd.Decode("execute order 66")
suite.EqualError(err, "Unknown command 'execute order 66'. If specified, command must be upgrade, delete, lint, or help.")
}