Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Gruenfelder committed Nov 8, 2023
1 parent 09fcfc1 commit d2a2120
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
14 changes: 7 additions & 7 deletions jest.setupAfterEnv.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use strict";

// turn off regular and error logging;
jest.spyOn(console, "log").mockImplementation();
jest.spyOn(console, "info").mockImplementation();
jest.spyOn(console, "warn").mockImplementation();
jest.spyOn(console, "error").mockImplementation();
jest.spyOn(process.stdout, "write").mockImplementation();
jest.spyOn(process.stderr, "write").mockImplementation();
// // turn off regular and error logging;
// jest.spyOn(console, "log").mockImplementation();
// jest.spyOn(console, "info").mockImplementation();
// jest.spyOn(console, "warn").mockImplementation();
// jest.spyOn(console, "error").mockImplementation();
// jest.spyOn(process.stdout, "write").mockImplementation();
// jest.spyOn(process.stderr, "write").mockImplementation();
7 changes: 4 additions & 3 deletions test-integration/_env/srv/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ const { generateCredentialsForCds } = require("./hana/helper");

let credentials = JSON.parse(process.env.HANA_DB_CREDENTIALS || null);
try {
if (process.env.NODE_ENV === "local-hana") {
credentials = require("../db/default-env").VCAP_SERVICES.hana[0].credentials;
} else if (process.env.NODE_ENV === "githubAction-hana") {
if (process.env.NODE_ENV === "githubAction-hana") {
credentials = generateCredentialsForCds();
} else {
credentials = require("../db/default-env").VCAP_SERVICES.hana[0].credentials;
}
} catch {
// Nothing to do
}

cds.log("/server").info("running on hana schema: ", credentials.schema);
cds.env.requires.db = {
kind: "hana",
credentials,
Expand Down

0 comments on commit d2a2120

Please sign in to comment.