mirror of
https://github.com/openappsec/openappsec.git
synced 2025-11-19 02:30:36 +03:00
Support local managment for embedded agent on nginx
This commit is contained in:
70
external/yq/acceptance_tests/pipe.sh
vendored
Executable file
70
external/yq/acceptance_tests/pipe.sh
vendored
Executable file
@@ -0,0 +1,70 @@
|
||||
#!/bin/bash
|
||||
|
||||
setUp() {
|
||||
rm test*.yml || true
|
||||
cat >test.yml <<EOL
|
||||
a: frog
|
||||
EOL
|
||||
}
|
||||
|
||||
testPipeViaCatWithParam() {
|
||||
X=$(cat test.yml | ./yq '.a')
|
||||
assertEquals "frog" "$X"
|
||||
}
|
||||
|
||||
testPipeViaCatWithParamEval() {
|
||||
X=$(cat test.yml | ./yq e '.a')
|
||||
assertEquals "frog" "$X"
|
||||
}
|
||||
|
||||
testPipeViaCatWithParamEvalAll() {
|
||||
X=$(cat test.yml | ./yq ea '.a')
|
||||
assertEquals "frog" "$X"
|
||||
}
|
||||
|
||||
testPipeViaCatNoParam() {
|
||||
X=$(cat test.yml | ./yq)
|
||||
assertEquals "a: frog" "$X"
|
||||
}
|
||||
|
||||
testPipeViaCatNoParamEval() {
|
||||
X=$(cat test.yml | ./yq e)
|
||||
assertEquals "a: frog" "$X"
|
||||
}
|
||||
|
||||
testPipeViaCatNoParamEvalAll() {
|
||||
X=$(cat test.yml | ./yq ea)
|
||||
assertEquals "a: frog" "$X"
|
||||
}
|
||||
|
||||
testPipeViaFileishWithParam() {
|
||||
X=$(./yq '.a' < test.yml)
|
||||
assertEquals "frog" "$X"
|
||||
}
|
||||
|
||||
testPipeViaFileishWithParamEval() {
|
||||
X=$(./yq e '.a' < test.yml)
|
||||
assertEquals "frog" "$X"
|
||||
}
|
||||
|
||||
testPipeViaFileishWithParamEvalAll() {
|
||||
X=$(./yq ea '.a' < test.yml)
|
||||
assertEquals "frog" "$X"
|
||||
}
|
||||
|
||||
testPipeViaFileishNoParam() {
|
||||
X=$(./yq < test.yml)
|
||||
assertEquals "a: frog" "$X"
|
||||
}
|
||||
|
||||
testPipeViaFileishNoParamEval() {
|
||||
X=$(./yq e < test.yml)
|
||||
assertEquals "a: frog" "$X"
|
||||
}
|
||||
|
||||
testPipeViaFileishNoParamEvalAll() {
|
||||
X=$(./yq ea < test.yml)
|
||||
assertEquals "a: frog" "$X"
|
||||
}
|
||||
|
||||
source ./scripts/shunit2
|
||||
Reference in New Issue
Block a user