Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

featfor mock and keplo): log which in mode keploy is running #85

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mock/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ export function NewContext(conf: Config) {
if (Mode.Valid(conf.Mode)) {
mode.SetMode(conf.Mode);
}

// log the value of the mode
console.log("keploy is in :", mode, " mode");
switch (mode.GetMode()) {
case "test":
if (conf.Name === "") {
Expand Down
7 changes: 7 additions & 0 deletions src/keploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,28 @@ export default class Keploy {
) {
// extract config from environment variables
this.mode = new Mode();

if (
process.env.KEPLOY_MODE !== undefined &&
Mode.Valid(process.env.KEPLOY_MODE)
) {
this.mode.SetMode(process.env.KEPLOY_MODE);
}

this.appConfig = this.validateAppConfig(app);
this.serverConfig = this.validateServerConfig(server);
this.grpcClient = new grpcObj.services.RegressionService(
this.serverConfig.url,
grpc.credentials.createInsecure()
);

this.responses = {};
this.dependencies = {};
this.mocks = {};

console.log("Keploy running in: ", process.env.KEPLOY_MODE, " mode");


}

validateServerConfig({
Expand Down