Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use goccy/go-yaml only #1088

Merged
merged 10 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions capture/runbook.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"sync"

"github.com/goccy/go-json"
"github.com/goccy/go-yaml"
"github.com/k1LoW/runn"
"google.golang.org/grpc/status"
"gopkg.in/yaml.v2"
)

var _ runn.Capturer = (*cRunbook)(nil)
Expand Down Expand Up @@ -560,7 +560,11 @@ func (c *cRunbook) writeRunbook(trs runn.Trails, bookPath string) {
r.Desc = fmt.Sprintf("Captured of %s run", filepath.Base(bookPath))
}
r.Labels = c.labels
b, err := yaml.Marshal(r)
encOpts := []yaml.EncodeOption{
yaml.UseSingleQuote(false),
yaml.UseLiteralStyleIfMultiline(true),
}
b, err := yaml.MarshalWithOptions(r, encOpts...)
if err != nil {
c.errs = errors.Join(c.errs, fmt.Errorf("failed to yaml.Marshal: %w", err))
return
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/gliderlabs/ssh v0.3.7
github.com/go-sql-driver/mysql v1.8.1
github.com/goccy/go-json v0.10.3
github.com/goccy/go-yaml v1.13.4
github.com/goccy/go-yaml v1.15.9
github.com/golang-sql/sqlexp v0.1.0
github.com/google/go-cmp v0.6.0
github.com/google/go-github/v58 v58.0.0
Expand All @@ -32,14 +32,14 @@ require (
github.com/itchyny/gojq v0.12.16
github.com/jhump/protoreflect/v2 v2.0.0-beta.2
github.com/juliangruber/go-intersect v1.1.0
github.com/k0kubun/pp/v3 v3.3.0
github.com/k0kubun/pp/v3 v3.4.1
github.com/k1LoW/bufresolv v0.7.4
github.com/k1LoW/concgroup v1.1.0
github.com/k1LoW/curlreq v0.3.3
github.com/k1LoW/donegroup v1.10.2
github.com/k1LoW/duration v1.2.0
github.com/k1LoW/exec v0.3.0
github.com/k1LoW/expand v0.13.0
github.com/k1LoW/expand v0.15.0
github.com/k1LoW/ghfs v1.3.1
github.com/k1LoW/go-github-client/v58 v58.0.12
github.com/k1LoW/grpcstub v0.25.0
Expand Down
22 changes: 6 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -797,8 +797,6 @@ github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWo
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fullstorydev/grpcurl v1.8.9 h1:JMvZXK8lHDGyLmTQ0ZdGDnVVGuwjbpaumf8p42z0d+c=
github.com/fullstorydev/grpcurl v1.8.9/go.mod h1:PNNKevV5VNAV2loscyLISrEnWQI61eqR0F8l3bVadAA=
github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gliderlabs/ssh v0.3.7 h1:iV3Bqi942d9huXnzEF2Mt+CY9gLu8DNM4Obd+8bODRE=
github.com/gliderlabs/ssh v0.3.7/go.mod h1:zpHEXBstFnQYtGnB8k8kQLol82umzn/2/snG7alWVD8=
Expand All @@ -819,12 +817,6 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M=
github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M=
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27HYW8P9FDk5PbgA=
github.com/go-playground/validator/v10 v10.22.1/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y=
github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
Expand All @@ -837,8 +829,8 @@ github.com/gobwas/ws v1.4.0/go.mod h1:G3gNqMNtPppf5XUz7O4shetPpcZ1VJ7zt18dlUeakr
github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA=
github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
github.com/goccy/go-yaml v1.13.4 h1:XOnLX9GqT+kH/gB7YzCMUiDBFU9B7pm3HZz6kyeDPkk=
github.com/goccy/go-yaml v1.13.4/go.mod h1:IjYwxUiJDoqpx2RmbdjMUceGHZwYLon3sfOGl5Hi9lc=
github.com/goccy/go-yaml v1.15.9 h1:500CYajdgpK4Smqrf86u7VMZuj/bFt2ghdff9D/nQYc=
github.com/goccy/go-yaml v1.15.9/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
Expand Down Expand Up @@ -1010,8 +1002,8 @@ github.com/juliangruber/go-intersect v1.1.0 h1:sc+y5dCjMMx0pAdYk/N6KBm00tD/f3tq+
github.com/juliangruber/go-intersect v1.1.0/go.mod h1:WMau+1kAmnlQnKiikekNJbtGtfmILU/mMU6H7AgKbWQ=
github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
github.com/k0kubun/pp/v3 v3.3.0 h1:/Unrck5tDGUSjsUJsmx9GUL64pNKOY5UEdoP1F7FBq8=
github.com/k0kubun/pp/v3 v3.3.0/go.mod h1:wJadGBvcY6JKaiUkB89VzUACKDmTX1r4aQTPERpZc6w=
github.com/k0kubun/pp/v3 v3.4.1 h1:1WdFZDRRqe8UsR61N/2RoOZ3ziTEqgTPVqKrHeb779Y=
github.com/k0kubun/pp/v3 v3.4.1/go.mod h1:+SiNiqKnBfw1Nkj82Lh5bIeKQOAkPy6Xw9CAZUZ8npI=
github.com/k1LoW/bufresolv v0.7.4 h1:k9Wx3YjWMSK87IqDKEhNTMOGgq+aXWJJIdgRXRUu7Ic=
github.com/k1LoW/bufresolv v0.7.4/go.mod h1:YAD7UyqFU2+hyrUot6HZtVCD2Hjk7PkO62id7GjCdn4=
github.com/k1LoW/concgroup v1.1.0 h1:yf7JEnvXPNlRdBw184mFaLz6w/anJMpe8fg4nJ8s4II=
Expand All @@ -1024,8 +1016,8 @@ github.com/k1LoW/duration v1.2.0 h1:qq1gWtPh7YROFyerBufVP+ATR11mOOHDInrcC/Xe/6A=
github.com/k1LoW/duration v1.2.0/go.mod h1:qUa0NptIiUl5EUsCc8wIiSaHuNjS4wmpYNMHp0l6pos=
github.com/k1LoW/exec v0.3.0 h1:lNUqhF5IXhm2aDKcaWxhGwYC/WLcCbLOqoe97oxW1XQ=
github.com/k1LoW/exec v0.3.0/go.mod h1:LSd4t5/1qGJHUdB2RUtoHuHfaZ3ks+BfQ+sGHzvwhnE=
github.com/k1LoW/expand v0.13.0 h1:ru9NQ6qntnS/TzE7QmxsQN+DUnpreZEuxGVD+72+3Fs=
github.com/k1LoW/expand v0.13.0/go.mod h1:LU8mfXnSF+DrzrAts+0L6YU5+ySVTWt33hUmOvR50A8=
github.com/k1LoW/expand v0.15.0 h1:p8MAJ/BFp7etawqsnu0oy1fPd5mwHZGq2bw0Dru8JnA=
github.com/k1LoW/expand v0.15.0/go.mod h1:V6uYRemnl93BcHVOJhL1OMf2CEVLNFjZhjxvymFpdMA=
github.com/k1LoW/ghfs v1.3.1 h1:xq/VenCDhSUDf1IsL0LBfWIn3QTCOOd8+pE0SNZF6wM=
github.com/k1LoW/ghfs v1.3.1/go.mod h1:IaAooDKpTdx/I0lSethYNMowo0rs0h/+btPPHdZlnE4=
github.com/k1LoW/go-github-client/v58 v58.0.12 h1:rIK+H2cSpK0ptOxNq0jITGu3ffRjLTe5ITCz1jik5c0=
Expand Down Expand Up @@ -1071,8 +1063,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80 h1:6Yzfa6GP0rIo/kULo2bwGEkFvCePZ3qHDDTC3/J9Swo=
github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs=
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
github.com/lestrrat-go/backoff/v2 v2.0.8 h1:oNb5E5isby2kiro9AgdHLv5N5tint1AnDVVf2E2un5A=
github.com/lestrrat-go/backoff/v2 v2.0.8/go.mod h1:rHP/q/r9aT27n24JQLa7JhSQZCKBBOiM/uP402WwN8Y=
github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I=
Expand Down
1 change: 0 additions & 1 deletion http.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ func (r *httpRequest) encodeBody() (io.Reader, error) {
case []byte:
return bytes.NewBuffer(r.body.([]byte)), nil
case []any:
// NOTE: flattenYamlAliases converts !!binary base64 data into array
arr, ok := r.body.([]any)
if !ok {
return nil, fmt.Errorf("invalid body: %v", r.body)
Expand Down
75 changes: 36 additions & 39 deletions runbook.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ import (
"strings"

"github.com/Songmu/axslogparser"
goyaml "github.com/goccy/go-yaml"
"github.com/goccy/go-yaml"
"github.com/goccy/go-yaml/ast"
"github.com/goccy/go-yaml/lexer"
"github.com/goccy/go-yaml/parser"
"github.com/goccy/go-yaml/token"
"github.com/k1LoW/curlreq"
"github.com/k1LoW/expand"
"github.com/k1LoW/grpcurlreq"
"gopkg.in/yaml.v2"
)

type position struct {
Expand Down Expand Up @@ -60,6 +59,8 @@ type runbook struct {
stepKeys []string
}

type runbookListed runbook

type runbookMapped struct {
Desc string `yaml:"desc,omitempty"`
Labels []string `yaml:"labels,omitempty"`
Expand All @@ -79,6 +80,14 @@ type runbookMapped struct {
Trace bool `yaml:"trace,omitempty"`
}

var decOpts = []yaml.DecodeOption{
yaml.UseOrderedMap(),
}

var encOpts = []yaml.EncodeOption{
yaml.UseLiteralStyleIfMultiline(true),
}

func NewRunbook(desc string) *runbook {
const defaultDesc = "Generated by `runn new`"
if desc == "" {
Expand Down Expand Up @@ -111,13 +120,8 @@ func parseRunbook(b []byte) (*runbook, error) {
return nil, err
}

flattened, err := flattenYamlAliases([]byte(rep))
if err != nil {
return nil, err
}

if err := yaml.Unmarshal(flattened, rb); err != nil {
if err := parseRunbookMapped(flattened, rb); err != nil {
if err := yaml.UnmarshalWithOptions([]byte(rep), rb, decOpts...); err != nil {
if err := parseRunbookAsMapped([]byte(rep), rb); err != nil {
return nil, err
}
}
Expand All @@ -129,36 +133,9 @@ func parseRunbook(b []byte) (*runbook, error) {
return rb, nil
}

func flattenYamlAliases(in []byte) ([]byte, error) {
decOpts := []goyaml.DecodeOption{
goyaml.UseOrderedMap(),
}

encOpts := []goyaml.EncodeOption{
goyaml.Flow(false),
goyaml.UseSingleQuote(false),
goyaml.UseLiteralStyleIfMultiline(false),
goyaml.IndentSequence(false),
}

var tmp any

err := goyaml.UnmarshalWithOptions(in, &tmp, decOpts...)
if err != nil {
return nil, err
}

flattened, err := goyaml.MarshalWithOptions(tmp, encOpts...)
if err != nil {
return nil, err
}

return flattened, nil
}

func parseRunbookMapped(b []byte, rb *runbook) error {
func parseRunbookAsMapped(b []byte, rb *runbook) error {
m := &runbookMapped{}
if err := yaml.Unmarshal(b, m); err != nil {
if err := yaml.UnmarshalWithOptions(b, m, decOpts...); err != nil {
return err
}
rb.useMap = true
Expand Down Expand Up @@ -224,7 +201,27 @@ func (rb *runbook) AppendStep(in ...string) error {

func (rb *runbook) MarshalYAML() (any, error) {
if !rb.useMap {
return rb, nil
return &runbookListed{
Desc: rb.Desc,
Labels: rb.Labels,
Needs: rb.Needs,
Runners: rb.Runners,
Vars: rb.Vars,
Secrets: rb.Secrets,
Steps: rb.Steps,
HostRules: rb.HostRules,
Debug: rb.Debug,
Interval: rb.Interval,
If: rb.If,
SkipTest: rb.SkipTest,
Loop: rb.Loop,
Concurrency: rb.Concurrency,
Force: rb.Force,
Trace: rb.Trace,

useMap: rb.useMap,
stepKeys: rb.stepKeys,
}, nil
}
if len(rb.stepKeys) != len(rb.Steps) {
return nil, errors.New("invalid runbook")
Expand Down
7 changes: 4 additions & 3 deletions runbook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"strings"
"testing"

"github.com/goccy/go-yaml"
"github.com/goccy/go-yaml/token"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/tenntenn/golden"
"gopkg.in/yaml.v2"
)

func TestParseRunbook(t *testing.T) {
Expand Down Expand Up @@ -43,14 +43,15 @@ func TestParseRunbook(t *testing.T) {
if len(rb.Vars) == 0 && len(rb.Runners) == 0 && len(rb.Steps) == 0 {
t.Error("want vars or runners or steps")
}
b, err := yaml.Marshal(rb)
b, err := yaml.MarshalWithOptions(rb, encOpts...)
if err != nil {
t.Error(err)
}
rb2, err := parseRunbook(b)
if err != nil {
t.Error(err)
}

if diff := cmp.Diff(rb, rb2, cmp.AllowUnexported(runbook{})); diff != "" {
t.Error(diff)
}
Expand Down Expand Up @@ -99,7 +100,7 @@ func TestAppendStep(t *testing.T) {
}

got := new(bytes.Buffer)
enc := yaml.NewEncoder(got)
enc := yaml.NewEncoder(got, encOpts...)
if err := enc.Encode(rb); err != nil {
t.Error(err)
}
Expand Down
2 changes: 1 addition & 1 deletion testdata/book/grpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ steps:
message:
field_bytes: "{{ toBase64('hello') }}" # Base64 encoding to pass bytes type
test: |
steps.field_types.res.status == 0 && fromBase64(steps.field_types.res.message.field_bytes) == 'hello'
steps.field_types.res.status == 0 && fromBase64(steps.field_types.res.message.field_bytes) == 'hello'
error_message:
desc: Get gRPC error message
greq:
Expand Down
4 changes: 2 additions & 2 deletions testdata/grpc.yml.runbook.golden
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ desc: Captured of grpc.yml run
runners:
greq:
addr: ${TEST_GRPC_ADDR-:grpc.example.com:443}
tls: true
skipVerify: true
bufDirs:
- ../
skipVerify: true
tls: true
steps:
- greq:
grpctest.GrpcTestService/Hello:
Expand Down
19 changes: 1 addition & 18 deletions testdata/http.yml.runbook.golden
Original file line number Diff line number Diff line change
Expand Up @@ -115,24 +115,7 @@ steps:
/upload:
post:
body:
application/octet-stream: !!binary |
/9j/4AAQSkZJRgABAQEAYABgAAD//gA+Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZy
BJSkcgSlBFRyB2ODApLCBkZWZhdWx0IHF1YWxpdHkK/9sAQwAIBgYHBgUIBwcHCQkICgwU
DQwLCwwZEhMPFB0aHx4dGhwcICQuJyAiLCMcHCg3KSwwMTQ0NB8nOT04MjwuMzQy/9sAQw
EJCQkMCwwYDQ0YMiEcITIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy
MjIyMjIyMjIyMjIy/8AAEQgAKAA8AwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAA
ABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQy
gZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWV
pjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrC
w8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQ
EAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEH
YXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSl
NUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKz
tLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQ
MRAD8A+f6KKKACiiigAooooAKKKKACiiigDp5UtWgf7ELASJKiQGeSAh4cHLEEDB/1ed2W
5bGMNWWkOmyG8YyFArsbVS2PMHOA3HHY579O+5cyigDes005dOQedaST+YrASAht5R8Akg
DYGCZ5x1J4PGbqQUTRf6nzvLHneTt2bsnGNvy/d25x3zVOigAooooAKKKKACiiigAooooA
KKKKAP/Z
application/octet-stream: !!binary /9j/4AAQSkZJRgABAQEAYABgAAD//gA+Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2ODApLCBkZWZhdWx0IHF1YWxpdHkK/9sAQwAIBgYHBgUIBwcHCQkICgwUDQwLCwwZEhMPFB0aHx4dGhwcICQuJyAiLCMcHCg3KSwwMTQ0NB8nOT04MjwuMzQy/9sAQwEJCQkMCwwYDQ0YMiEcITIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy/8AAEQgAKAA8AwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A+f6KKKACiiigAooooAKKKKACiiigDp5UtWgf7ELASJKiQGeSAh4cHLEEDB/1ed2W5bGMNWWkOmyG8YyFArsbVS2PMHOA3HHY579O+5cyigDes005dOQedaST+YrASAht5R8AkgDYGCZ5x1J4PGbqQUTRf6nzvLHneTt2bsnGNvy/d25x3zVOigAooooAKKKKACiiigAooooAKKKKAP/Z
test: |
current.res.status == 201
&& current.res.headers["Content-Length"][0] == "15"
Expand Down
1 change: 1 addition & 0 deletions testdata/pick_step.single_step_map.yml.0.golden
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
7 the_only_step:
8 test: |
9 vars.hello == "hello"
3 changes: 1 addition & 2 deletions testdata/pick_step.yaml_anchor_alias.yml.0.golden
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
34 check_string_alias_in_vars:
35 test: |
36 vars.string_alias == "abcdefg"
37
36 vars.string_alias == "abcdefg"
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
24 check_1:
25 desc: 'with anchor & alias'
26 test: |
27 compare(vars.my_hash_anchor_merged, {a: 1, b: 2, c: 3, d: 100})
28
27 compare(vars.my_hash_anchor_merged, {a: 1, b: 2, c: 3, d: 100})
Loading
Loading