1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/cli/compose/schema/schema_test.go
Daniel Nephin f5af9b9738 Replace vendor of aanand/compose-file with a local copy.
Add go-bindata for including the schema.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-12-27 16:17:24 -05:00

35 lines
496 B
Go

package schema
import (
"testing"
"github.com/stretchr/testify/assert"
)
type dict map[string]interface{}
func TestValid(t *testing.T) {
config := dict{
"version": "2.1",
"services": dict{
"foo": dict{
"image": "busybox",
},
},
}
assert.NoError(t, Validate(config))
}
func TestUndefinedTopLevelOption(t *testing.T) {
config := dict{
"version": "2.1",
"helicopters": dict{
"foo": dict{
"image": "busybox",
},
},
}
assert.Error(t, Validate(config))
}