Exemplo n.º 1
0
				},
				ResourceLimits: &models.ResourceLimits{Nofile: &nofile},
			}),
		)

		Describe("Validate", func() {
			var runAction *models.RunAction

			Context("when the action has the required fields", func() {
				It("is valid", func() {
					runAction = &models.RunAction{
						Path: "ls",
						User: "******",
					}

					err := runAction.Validate()
					Expect(err).NotTo(HaveOccurred())
				})
			})

			for _, testCase := range []ValidatorErrorCase{
				{
					"path",
					&models.RunAction{
						User: "******",
					},
				},
				{
					"user",
					&models.RunAction{
						Path: "ls",