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

feat: create a keploy config file #982

Merged

Conversation

AkashKumar7902
Copy link
Member

@AkashKumar7902 AkashKumar7902 commented Oct 7, 2023

Related Issue

  • Info about Issue or bug

Closes: #948

Describe the changes you've made

added a config file containing editable fields for different flags in record and test. flag passed through command line will always take precedence over the values provided in config file.

=========USING KEPLOY-CONFIG.YAML=========

keploy-config.yaml is a configuration file for record/test command to allow users to define their testing configuration. Instead of passing the same flags in each record/test command, you can now define them in a configuration file.

keploy-config.yaml must be created in the same directory from which you are running the keploy commands. The configuration file contains two separate divisions for your record and test configs.

=========CONTENTS==========

To know what each flag does, run record/test command with --help flag.

record:
 path: (string)
 command: (string)
 containerName: (string)
 networkName: (string)
 delay: (integer)
 passThroughPorts: (array of integers)

test:
 path: (string)
 command: (string)
 containerName: (string)
 networkName: (string)
 testSets: (arrays of strings)
 delay: (integer)
 apiTimeout: (integer)
 passThroughPorts: (array of integers)

Note: any config flags passed through command will always take precedence over what is defined in the configuration file.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Please let us know if any test cases are added

Please describe the tests(if any). Provide instructions how its affecting the coverage.

Describe if there is any unusual behaviour of your code(Write NA if there isn't)

NA

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

Screenshots (if any)

Original Updated
original screenshot updated screenshot

Signed-off-by: Akash Kumar <meakash7902@gmail.com>
Signed-off-by: Akash Kumar <meakash7902@gmail.com>
@Sarthak160
Copy link
Member

Sarthak160 commented Oct 9, 2023

@AkashKumar7902 Can you please resolve the conflicts !

@AkashKumar7902
Copy link
Member Author

@Sarthak160 Done !

@Sarthak160
Copy link
Member

Can you please provide instructions to replace values via the config file ?

@AkashKumar7902
Copy link
Member Author

@Sarthak160 sure :)
where do you want to add these instructions ?

@PranshuSrivastava
Copy link
Member

@AkashKumar7902 just add the instructions in the PR template, under "Describe the changes you have made" and please fix the merge conflicts.

@AkashKumar7902
Copy link
Member Author

@PranshuSrivastava Done!

Copy link
Member

@Sarthak160 Sarthak160 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please Resolve conflicts! Rest looks fine

@Sarthak160 Sarthak160 merged commit 5404dba into keploy:main Oct 26, 2023
6 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature]: create a keploy config file for the user specific modifications
3 participants