Skip to content

Commit

Permalink
resolve service schema warning
Browse files Browse the repository at this point in the history
  • Loading branch information
icebob committed Nov 12, 2023
1 parent 8c6f091 commit 6530d0e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions test/integration/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ if (process.env.GITHUB_ACTIONS_CI) {
Adapters = [
{
type: "NeDB"
},
} /*,
{ type: "MongoDB", options: { dbName: "db_int_test" } },
{
name: "Knex-SQLite",
Expand All @@ -137,7 +137,7 @@ if (process.env.GITHUB_ACTIONS_CI) {
}
}
}
} /*,
}*/ /*,
{
name: "Knex-Postgresql",
type: "Knex",
Expand Down
12 changes: 8 additions & 4 deletions test/integration/tenants.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,8 @@ module.exports = (getAdapter, adapterType) => {

describe("Test record-level tenancy", () => {
const broker = new ServiceBroker({ logger: false });
const svc = broker.createService(baseServiceSchema, {
const svc = broker.createService({
mixins: [baseServiceSchema],
settings: {
fields: {
tenantId: {
Expand Down Expand Up @@ -719,7 +720,8 @@ module.exports = (getAdapter, adapterType) => {

describe("Test collection-level tenancy", () => {
const broker = new ServiceBroker({ logger: false });
const svc = broker.createService(baseServiceSchema, {
const svc = broker.createService({
mixins: [baseServiceSchema],
methods: {
getAdapterByContext(ctx, adapterDef) {
const tenantId = ctx && ctx.meta.tenantId;
Expand Down Expand Up @@ -759,7 +761,8 @@ module.exports = (getAdapter, adapterType) => {
if (adapterType == "Knex" && getAdapter.adapterName != "Knex-SQLite") {
describe("Test schema-level tenancy", () => {
const broker = new ServiceBroker({ logger: false });
const svc = broker.createService(baseServiceSchema, {
const svc = broker.createService({
mixins: [baseServiceSchema],
methods: {
getAdapterByContext(ctx, adapterDef) {
const tenantId = ctx.meta.tenantId;
Expand Down Expand Up @@ -809,7 +812,8 @@ module.exports = (getAdapter, adapterType) => {

describe("Test database-level tenancy", () => {
const broker = new ServiceBroker({ logger: false });
const svc = broker.createService(baseServiceSchema, {
const svc = broker.createService({
mixins: [baseServiceSchema],
methods: {
getAdapterByContext(ctx, adapterDef) {
const tenantId = ctx.meta.tenantId;
Expand Down

0 comments on commit 6530d0e

Please sign in to comment.