added flow commands for testing validator vs jspg
This commit is contained in:
13
flow
13
flow
@ -97,11 +97,16 @@ install() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
test() {
|
test-jspg() {
|
||||||
info "Running jspg tests..."
|
info "Running jspg tests..."
|
||||||
cargo pgrx test "pg${POSTGRES_VERSION}" "$@" || return $?
|
cargo pgrx test "pg${POSTGRES_VERSION}" "$@" || return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test-validator() {
|
||||||
|
info "Running validator tests..."
|
||||||
|
cargo test -p boon --features "pgrx/pg${POSTGRES_VERSION}" "$@" || return $?
|
||||||
|
}
|
||||||
|
|
||||||
clean() {
|
clean() {
|
||||||
info "Cleaning build artifacts..."
|
info "Cleaning build artifacts..."
|
||||||
cargo clean || return $?
|
cargo clean || return $?
|
||||||
@ -111,7 +116,8 @@ jspg-usage() {
|
|||||||
printf "prepare\tCheck OS, Cargo, and PGRX dependencies.\n"
|
printf "prepare\tCheck OS, Cargo, and PGRX dependencies.\n"
|
||||||
printf "install\tBuild and install the extension locally (after prepare).\n"
|
printf "install\tBuild and install the extension locally (after prepare).\n"
|
||||||
printf "reinstall\tClean, build, and install the extension locally (after prepare).\n"
|
printf "reinstall\tClean, build, and install the extension locally (after prepare).\n"
|
||||||
printf "test\t\tRun pgrx integration tests.\n"
|
printf "test-jspg\t\tRun pgrx integration tests.\n"
|
||||||
|
printf "test-validator\t\tRun validator integration tests.\n"
|
||||||
printf "clean\t\tRemove pgrx build artifacts.\n"
|
printf "clean\t\tRemove pgrx build artifacts.\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,7 +127,8 @@ jspg-flow() {
|
|||||||
build) build; return $?;;
|
build) build; return $?;;
|
||||||
install) install; return $?;;
|
install) install; return $?;;
|
||||||
reinstall) clean && install; return $?;;
|
reinstall) clean && install; return $?;;
|
||||||
test) test "${@:2}"; return $?;;
|
test-jspg) test-jspg "${@:2}"; return $?;;
|
||||||
|
test-validator) test-validator "${@:2}"; return $?;;
|
||||||
clean) clean; return $?;;
|
clean) clean; return $?;;
|
||||||
*) return 1 ;;
|
*) return 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@ -849,7 +849,6 @@ impl<'v, 's> Validator<'v, 's, '_, '_> {
|
|||||||
) -> Result<(), ValidationError<'s, 'v>> {
|
) -> Result<(), ValidationError<'s, 'v>> {
|
||||||
let scope = self.scope.child(sch, ref_kw, self.scope.vid);
|
let scope = self.scope.child(sch, ref_kw, self.scope.vid);
|
||||||
let schema = &self.schemas.get(sch);
|
let schema = &self.schemas.get(sch);
|
||||||
let be_strict = self.options.map_or(false, |o| o.be_strict);
|
|
||||||
let (result, reply) = Validator {
|
let (result, reply) = Validator {
|
||||||
v: self.v,
|
v: self.v,
|
||||||
vloc: self.vloc,
|
vloc: self.vloc,
|
||||||
|
|||||||
Reference in New Issue
Block a user