mirror of https://github.com/databricks/cli.git
Add test for passing --var twice for the same arg (#2176)
This shows that passing two --var for the same arg is rejected currently.
This commit is contained in:
parent
89eb556318
commit
560c3d352e
|
@ -0,0 +1,6 @@
|
|||
bundle:
|
||||
name: arg-repeat
|
||||
|
||||
variables:
|
||||
a:
|
||||
default: hello
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
>>> errcode $CLI bundle validate --var a=one -o json
|
||||
|
||||
Exit code: 0
|
||||
{
|
||||
"a": {
|
||||
"default": "hello",
|
||||
"value": "one"
|
||||
}
|
||||
}
|
||||
|
||||
>>> errcode $CLI bundle validate --var a=one --var a=two
|
||||
Error: failed to assign two to a: variable has already been assigned value: one
|
||||
|
||||
Name: arg-repeat
|
||||
Target: default
|
||||
|
||||
Found 1 error
|
||||
|
||||
Exit code: 1
|
|
@ -0,0 +1,2 @@
|
|||
trace errcode $CLI bundle validate --var a=one -o json | jq .variables
|
||||
trace errcode $CLI bundle validate --var a=one --var a=two
|
Loading…
Reference in New Issue