Add example job definition to manager tests 97/177397/2
authorAleksander Mistewicz <a.mistewicz@samsung.com>
Wed, 29 Nov 2017 15:34:02 +0000 (16:34 +0100)
committerAleksander Mistewicz <a.mistewicz@samsung.com>
Thu, 28 Jun 2018 14:50:17 +0000 (16:50 +0200)
Change-Id: Ib8f5dd6f989a0fb5a2edc4cddaab6c186b5d80d6
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
manager/dryad_job_runner_conf_test.go [new file with mode: 0644]

diff --git a/manager/dryad_job_runner_conf_test.go b/manager/dryad_job_runner_conf_test.go
new file mode 100644 (file)
index 0000000..2ad18b8
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ *  Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License
+ */
+
+package manager
+
+import (
+       "git.tizen.org/tools/weles"
+)
+
+// basicConfig is incomplete, but contains necessary definitions
+// for some of the tests. It can be used as a base for more complex
+// definitions.
+var basicConfig = weles.Config{
+       Action: weles.Action{
+               Deploy: weles.Deploy{
+                       Images: []weles.ImageDefinition{
+                               {Path: "artifact/path/image1"},
+                               {Path: "artifact/path/image2"},
+                       },
+                       PartitionLayout: []weles.PartitionDefinition{
+                               {
+                                       ID:        1,
+                                       ImageName: "image name_1",
+                                       Size:      "4096",
+                               },
+                               {
+                                       ID:        2,
+                                       ImageName: "image_name 2",
+                                       Size:      "1234",
+                               },
+                       },
+               },
+               Boot: weles.Boot{
+                       Login:         "test_login",
+                       Password:      "test_password",
+                       Prompts:       []string{"prompt ~1"},
+                       InputSequence: "\n",
+                       WaitPattern:   "device login:",
+               },
+               Test: weles.Test{
+                       TestCases: []weles.TestCase{
+                               {
+                                       TestActions: []weles.TestAction{
+                                               weles.Push{
+                                                       Path: "artifact/path/test_push1",
+                                                       Dest: "dest of test_push1",
+                                               },
+                                               weles.Run{
+                                                       Name: "command to be run",
+                                               },
+                                               weles.Pull{
+                                                       Src:  "src of test_pull1",
+                                                       Path: "artifact/path/test_push1",
+                                               },
+                                       },
+                               },
+                       },
+               },
+       },
+}