summaryrefslogtreecommitdiff
path: root/sandpit
diff options
context:
space:
mode:
Diffstat (limited to 'sandpit')
-rw-r--r--sandpit/test_yaml.go20
1 files changed, 18 insertions, 2 deletions
diff --git a/sandpit/test_yaml.go b/sandpit/test_yaml.go
index ebe8758..bd90e01 100644
--- a/sandpit/test_yaml.go
+++ b/sandpit/test_yaml.go
@@ -34,12 +34,23 @@ s_msg:
- s_tag: BUILD
s_args:
- suites/jessie
- - suites/ascii
+ - suites/ascii
- s_tag: REMOVE
s_args:
- file1
+ - s_tag: CUSTOM
+ s_args: [first, second, third]
`
+var other_msg = `
+s_msg: [
+ {s_tag: "BUILD", s_args: [suites/jessie, suites/ascii]},
+ {s_tag: "REMOVE", s_args: [file1]},
+ {s_tag: "CUSTOM", s_args: [first, second, third]}
+ ]
+`
+
+
var cfg_str = `
s_cfg:
- s_tag: BUILD
@@ -53,6 +64,11 @@ s_cfg:
- s_tag: REMOVE
s_commands:
- s_cmd: file:///bin/rm
+ - s_tag: CUSTOM
+ s_commands: [
+ {s_cmd: "file:///home/user/script/sh", s_hash: "1234567890abcdef"},
+ {s_cmd: "http://my.server.net/submit.php", s_hash: "0987654321abce"}
+ ]
`
func main() {
@@ -63,7 +79,7 @@ func main() {
//log.Printf("%s\n", test_str)
- err := yaml.Unmarshal([]byte(msg_str), &c)
+ err := yaml.Unmarshal([]byte(other_msg), &c)
if err != nil {
log.Fatal("error: ", err)
}