feat: add support for Postgres 14 (#7644)

This commit is contained in:
Corey
2021-10-31 15:49:03 -04:00
committed by GitHub
parent 28fa7167e8
commit 090350a7a0
8 changed files with 73 additions and 17 deletions

View File

@@ -17,8 +17,10 @@
"notEqual": true,
"it_only_db": true,
"it_only_mongodb_version": true,
"it_only_postgres_version": true,
"fit_only_mongodb_version": true,
"it_exclude_mongodb_version": true,
"it_exclude_postgres_version": true,
"fit_exclude_mongodb_version": true,
"it_exclude_dbs": true,
"describe_only_db": true,

View File

@@ -223,9 +223,8 @@ describe('Parse.Query Aggregate testing', () => {
const obj3 = new TestObject();
const pipeline = [
{
// TODO: update to new syntax. See [#7339](https://bit.ly/3incnWx)
group: {
objectId: {
$group: {
_id: {
day: { $dayOfMonth: '$_updated_at' },
month: { $month: '$_created_at' },
year: { $year: '$_created_at' },
@@ -254,9 +253,8 @@ describe('Parse.Query Aggregate testing', () => {
const obj3 = new TestObject();
const pipeline = [
{
// TODO: update to new syntax. See [#7339](https://bit.ly/3incnWx)
group: {
objectId: {
$group: {
_id: {
day: { $dayOfMonth: '$updatedAt' },
month: { $month: '$createdAt' },
year: { $year: '$createdAt' },

View File

@@ -446,6 +446,15 @@ global.it_only_mongodb_version = version => {
}
};
global.it_only_postgres_version = version => {
const envVersion = process.env.POSTGRES_VERSION;
if (!envVersion || semver.satisfies(envVersion, version)) {
return it;
} else {
return xit;
}
};
global.fit_only_mongodb_version = version => {
const envVersion = process.env.MONGODB_VERSION;
if (!envVersion || semver.satisfies(envVersion, version)) {
@@ -464,6 +473,15 @@ global.it_exclude_mongodb_version = version => {
}
};
global.it_exclude_postgres_version = version => {
const envVersion = process.env.POSTGRES_VERSION;
if (!envVersion || !semver.satisfies(envVersion, version)) {
return it;
} else {
return xit;
}
};
global.fit_exclude_mongodb_version = version => {
const envVersion = process.env.MONGODB_VERSION;
if (!envVersion || !semver.satisfies(envVersion, version)) {