Skip to content

Commit

Permalink
Add e2e cases for some functionality in example/client/mlyc
Browse files Browse the repository at this point in the history
  • Loading branch information
dchoi-viant committed Oct 9, 2023
1 parent c938d2d commit 36425bf
Show file tree
Hide file tree
Showing 26 changed files with 57 additions and 3 deletions.
5 changes: 2 additions & 3 deletions example/client/mlyc/mlyc.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ func main() {
})

// this is an example usage of a non-Storable type being bound to Response.Data
client.CustomMakerRegistry.Register("custom", func() interface{} {
// TODO provide actual example
return struct{}{}
client.CustomMakerRegistry.Register("slft_batch", func() interface{} {
return new(slfmodel.Segmented)
})

client.Run(os.Args[1:])
Expand Down
55 changes: 55 additions & 0 deletions example/e2e/regression/cases/001_e2e_client/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
init:
parentPath: $parent.path

pipeline:
test:
action: exec:run
target: $target
checkError: true
commands:
- /tmp/e2e/mlyc -m sli -a 'sa:a;sl:a;aux:test;kf:k'
- /tmp/e2e/mlyc -m slf -s slft_batch -a 'sa:a,b;sl:b;aux:test'
- /tmp/e2e/mlyc -m slf --maker=slft_batch -a 'sa:b;sl:b;aux:test'

assert:
action: validator:assert
init:
actual: $AsJSON($test.Cmd[0].Stdout)
actual: $actual
expect: |
{
"data": {
"D": {
"expand": 25
}
}
}
assertStorable:
action: validator:assert
init:
actual: $AsJSON($test.Cmd[1].Stdout)
actual: $actual
expect: |
{
"data": [
{
"Class": "five"
},
{
"Class": "five"
}
]
}
assertCustom:
action: validator:assert
init:
actual: $AsJSON($test.Cmd[2].Stdout)
actual: $actual
expect: |
{
"data": {
"Class": "five"
}
}

0 comments on commit 36425bf

Please sign in to comment.