![Ian Howell](/assets/img/avatar_default.png)
This commit removes any assertion from Go's "testing" package, preferring instead to use an assertion from the testify package. All tests now have uniformity. This also decrease the number of iterations in the password generation test, decreasing test runtime tenfold Change-Id: I8799110e93dfa19bebe9050528e865b4c991c3df
25 lines
415 B
Go
25 lines
415 B
Go
package isogen
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestToYaml(t *testing.T) {
|
|
expectedBytes := []byte(`builder: {}
|
|
container:
|
|
containerRuntime: docker
|
|
`)
|
|
cnf := &Config{
|
|
Container: Container{
|
|
ContainerRuntime: "docker",
|
|
},
|
|
}
|
|
|
|
actualBytes, err := cnf.ToYAML()
|
|
require.NoError(t, err)
|
|
assert.Equal(t, actualBytes, expectedBytes)
|
|
}
|