}
		})
	})

	Describe("Try", func() {
		itSerializesAndDeserializes(
			`{
					"action": {
						"run": {
							"path": "echo",
							"resource_limits":{},
							"user": "******"
						}
					}
			}`,
			models.Try(&models.RunAction{Path: "echo", User: "******"}),
		)

		itSerializesAndDeserializes(
			`{
					"action": null
			}`,
			models.Try(nil),
		)

		itDeserializes(
			`{}`,
			models.Try(nil),
		)

		Describe("Validate", func() {
Ejemplo n.º 2
0
		})
	})

	Describe("Try", func() {
		itSerializesAndDeserializes(
			`{
					"action": {
						"run": {
							"path": "echo",
							"args": null,
							"env": null,
							"resource_limits":{}
						}
					}
			}`,
			models.Try(&models.RunAction{Path: "echo"}),
		)

		itSerializesAndDeserializes(
			`{
					"action": null
			}`,
			models.Try(nil),
		)

		itDeserializes(
			`{}`,
			models.Try(nil),
		)

		Describe("Validate", func() {