Cypress test for Streams

and updated cypress + packages
This commit is contained in:
Jamie Curnow
2025-02-05 09:00:31 +10:00
parent b4793d3c16
commit 6bcc30bfe9
7 changed files with 223 additions and 12 deletions

View File

@@ -9,7 +9,7 @@ const internalHost = require('./host');
const {castJsonIfNeed} = require('../lib/helpers');
function omissions () {
return ['is_deleted'];
return ['is_deleted', 'owner.is_deleted', 'certificate.is_deleted'];
}
const internalStream = {

View File

@@ -8,6 +8,7 @@ const now = require('./now_helper');
Model.knex(db);
const boolFields = [
'enabled',
'is_deleted',
'tcp_forwarding',
'udp_forwarding',

View File

@@ -20,8 +20,25 @@
"type": "integer",
"minimum": 1,
"maximum": 65535,
"if": {"properties": {"tcp_forwarding": {"const": true}}},
"then": {"not": {"oneOf": [{"const": 80}, {"const": 443}]}}
"if": {
"type": "object",
"properties": {
"tcp_forwarding": {
"const": true
}
}
},
"then": {
"not": {
"oneOf": [
{
"const": 80
}, {
"const": 443
}
]
}
}
},
"forwarding_host": {
"anyOf": [
@@ -60,6 +77,12 @@
},
"meta": {
"type": "object"
},
"owner": {
"$ref": "./user-object.json"
},
"certificate": {
"$ref": "./certificate-object.json"
}
}
}