test: update command validation test with new cases
This commit is contained in:
parent
aa6d5ebbfb
commit
0a76fb12d8
@ -8,13 +8,18 @@ pallav:
|
|||||||
- base
|
- base
|
||||||
- workspace
|
- workspace
|
||||||
- all
|
- all
|
||||||
|
update:
|
||||||
|
- access
|
||||||
clean:
|
clean:
|
||||||
status:
|
status:
|
||||||
multiArgsCommands:
|
multiArgsCommands:
|
||||||
remove:
|
remove:
|
||||||
|
- pallav
|
||||||
- palak
|
- palak
|
||||||
- param
|
- param
|
||||||
- darshan
|
- darshan
|
||||||
|
arbitArgsCommands:
|
||||||
|
- rmi
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
source ./validate_command_access.sh
|
source ./validate_command_access.sh
|
||||||
@ -29,19 +34,33 @@ testcase() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ----- Fixed Args Commands -----
|
||||||
testcase "build base (valid)" build base
|
testcase "build base (valid)" build base
|
||||||
testcase "build all (valid)" build all
|
testcase "build all (valid)" build all
|
||||||
testcase "build base workspace (invalid)" build base workspace || true
|
testcase "build base workspace (invalid)" build base workspace || true
|
||||||
testcase "build (no arg, invalid)" build || true
|
testcase "build (no arg, invalid)" build || true
|
||||||
|
testcase "update access (valid)" update access
|
||||||
testcase "clean (zero-arg, valid)" clean
|
testcase "clean (zero-arg, valid)" clean
|
||||||
testcase "clean with arg (invalid)" clean foo || true
|
testcase "clean with arg (invalid)" clean foo || true
|
||||||
|
|
||||||
|
testcase "status (zero-arg, valid)" status
|
||||||
|
testcase "status foo (invalid)" status foo || true
|
||||||
|
|
||||||
|
# ----- Multi Args Commands -----
|
||||||
testcase "remove palak (valid)" remove palak
|
testcase "remove palak (valid)" remove palak
|
||||||
testcase "remove param palak (valid, any order)" remove param palak
|
testcase "remove param palak (valid, any order)" remove param palak
|
||||||
testcase "remove palak param darshan (valid, any order)" remove palak param darshan
|
testcase "remove palak param darshan (valid, any order)" remove palak param darshan
|
||||||
|
testcase "remove pallav (valid)" remove pallav -f
|
||||||
testcase "remove (no arg, invalid)" remove || true
|
testcase "remove (no arg, invalid)" remove || true
|
||||||
testcase "remove foo (invalid)" remove foo || true
|
testcase "remove foo (invalid)" remove foo || true
|
||||||
testcase "remove palak palak (duplicate, invalid)" remove palak palak || true
|
testcase "remove palak palak (duplicate, invalid)" remove palak palak || true
|
||||||
|
|
||||||
testcase "status (zero-arg, valid)" status
|
# ----- Arbitrary Args Commands -----
|
||||||
testcase "status foo (invalid)" status foo || true
|
testcase "rmi no args (valid)" rmi
|
||||||
|
testcase "rmi one arg (valid)" rmi image1
|
||||||
|
testcase "rmi multiple args (valid)" rmi image1 image2 image3
|
||||||
|
testcase "rmi with flag (valid)" rmi -f image1 image2
|
||||||
|
testcase "rmi with only flag (valid)" rmi -f
|
||||||
|
|
||||||
|
# ----- Disallowed command -----
|
||||||
|
testcase "foo (invalid command)" foo image1 # should fail
|
||||||
|
Loading…
x
Reference in New Issue
Block a user