github.com/pluralsh/plural-cli@v0.9.5/pkg/bundle/tests/utils.go (about)

     1  package tests
     2  
     3  import (
     4  	"github.com/pluralsh/plural-cli/pkg/api"
     5  	"github.com/pluralsh/plural-cli/pkg/manifest"
     6  )
     7  
     8  type ContextValue struct {
     9  	Val     interface{}
    10  	Present bool
    11  }
    12  
    13  func collectArguments(args []*api.TestArgument, ctx *manifest.Context) map[string]*ContextValue {
    14  	res := make(map[string]*ContextValue)
    15  	for _, arg := range args {
    16  		val, ok := ctx.Configuration[arg.Repo][arg.Key]
    17  		res[arg.Name] = &ContextValue{val, ok}
    18  	}
    19  	return res
    20  }