Esempio n. 1
0
	Describe("VersionDownTo", func() {
		Context("V1", func() {
			BeforeEach(func() {
				task.Action = models.WrapAction(models.Timeout(
					&models.RunAction{
						Path: "/the/path",
						User: "******",
					},
					10*time.Millisecond,
				))
			})

			It("converts TimeoutMs to Timeout in Nanoseconds", func() {
				task.VersionDownTo(format.V1)
				Expect(task.GetAction().GetTimeoutAction().DeprecatedTimeoutNs).To(BeEquivalentTo(10 * time.Millisecond))
			})
		})

		Context("V0", func() {
			var (
				downloadAction1, downloadAction2 *models.DownloadAction
			)

			Context("timeouts", func() {
				BeforeEach(func() {
					task.Action = models.WrapAction(models.Timeout(
						&models.RunAction{
							Path: "/the/path",
							User: "******",
						},