tests: add basic cli tests
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
@@ -208,7 +208,10 @@ func (v *Value) Source(opts ...cue.Option) ([]byte, error) {
|
||||
v.cc.rlock()
|
||||
defer v.cc.runlock()
|
||||
|
||||
return cueformat.Node(v.val.Eval().Syntax(opts...))
|
||||
return cueformat.Node(v.val.Eval().Syntax(opts...),
|
||||
cueformat.UseSpaces(4),
|
||||
cueformat.TabIndent(false),
|
||||
)
|
||||
}
|
||||
|
||||
func (v *Value) IsEmptyStruct() bool {
|
||||
|
@@ -46,7 +46,11 @@ func NewStore(root string) (*Store, error) {
|
||||
}
|
||||
|
||||
func DefaultStore() (*Store, error) {
|
||||
return NewStore(os.ExpandEnv(defaultStoreRoot))
|
||||
root := defaultStoreRoot
|
||||
if r := os.Getenv("DAGGER_STORE"); r != "" {
|
||||
root = r
|
||||
}
|
||||
return NewStore(root)
|
||||
}
|
||||
|
||||
func (s *Store) deploymentPath(name string) string {
|
||||
|
Reference in New Issue
Block a user