diff --git a/.github/ISSUE_TEMPLATE/--bug-report.yaml b/.github/ISSUE_TEMPLATE/--bug-report.yaml index 63fd535..cc41569 100644 --- a/.github/ISSUE_TEMPLATE/--bug-report.yaml +++ b/.github/ISSUE_TEMPLATE/--bug-report.yaml @@ -1,57 +1,57 @@ -name: Bug report -description: Create a bug report to help us improve Keploy -title: "[bug]: " -labels: [bug] -body: -- type: markdown - attributes: - value: | - Thank you for taking the time to fill out this bug report. -- type: checkboxes - attributes: - label: Is there an existing issue for this? - description: Please search to see if an issue already exists for the bug you encountered - options: - - label: I have searched the existing issues - required: true -- type: textarea - attributes: - label: Current behavior - description: A concise description of what you're experiencing and what you expect - placeholder: | - When I do , happens and I see the error message attached below: - ```...``` - What I expect is - validations: - required: true -- type: textarea - attributes: - label: Steps to reproduce - description: Add steps to reproduce this behaviour, include console or network logs and screenshots - placeholder: | - 1. Go to '...' - 2. Click on '....' - 3. Scroll down to '....' - 4. See error - validations: - required: true -- type: dropdown - id: env - attributes: - label: Environment - options: - - Production - - Release - - Deploy preview - validations: - required: false -- type: dropdown - id: version - attributes: - label: Version - options: - - Cloud - - Self-hosted - - Local - validations: +name: Bug report +description: Create a bug report to help us improve Keploy +title: "[bug]: " +labels: [bug] +body: +- type: markdown + attributes: + value: | + Thank you for taking the time to fill out this bug report. +- type: checkboxes + attributes: + label: Is there an existing issue for this? + description: Please search to see if an issue already exists for the bug you encountered + options: + - label: I have searched the existing issues + required: true +- type: textarea + attributes: + label: Current behavior + description: A concise description of what you're experiencing and what you expect + placeholder: | + When I do , happens and I see the error message attached below: + ```...``` + What I expect is + validations: + required: true +- type: textarea + attributes: + label: Steps to reproduce + description: Add steps to reproduce this behaviour, include console or network logs and screenshots + placeholder: | + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + validations: + required: true +- type: dropdown + id: env + attributes: + label: Environment + options: + - Production + - Release + - Deploy preview + validations: + required: false +- type: dropdown + id: version + attributes: + label: Version + options: + - Cloud + - Self-hosted + - Local + validations: required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/--feature-request.yaml b/.github/ISSUE_TEMPLATE/--feature-request.yaml index 8a0e9ac..05fc64e 100644 --- a/.github/ISSUE_TEMPLATE/--feature-request.yaml +++ b/.github/ISSUE_TEMPLATE/--feature-request.yaml @@ -1,28 +1,28 @@ -name: Feature request -description: Suggest a feature to improve Keploy -title: "[feature]: " -labels: [feature] -body: -- type: markdown - attributes: - value: | - Thank you for taking the time to request a feature for Keploy -- type: checkboxes - attributes: - label: Is there an existing feature request for this? - description: Please search to see if an issue related to this feature request/feature request already exists - options: - - label: I have searched the existing issues - required: true -- type: textarea - attributes: - label: Summary - description: One paragraph description of the feature - validations: - required: true -- type: textarea - attributes: - label: Why should this be worked on? - description: A concise description of the problems or use cases for this feature request - validations: +name: Feature request +description: Suggest a feature to improve Keploy +title: "[feature]: " +labels: [feature] +body: +- type: markdown + attributes: + value: | + Thank you for taking the time to request a feature for Keploy +- type: checkboxes + attributes: + label: Is there an existing feature request for this? + description: Please search to see if an issue related to this feature request/feature request already exists + options: + - label: I have searched the existing issues + required: true +- type: textarea + attributes: + label: Summary + description: One paragraph description of the feature + validations: + required: true +- type: textarea + attributes: + label: Why should this be worked on? + description: A concise description of the problems or use cases for this feature request + validations: required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 6d0c5b2..6b9021c 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,7 +1,7 @@ -contact_links: - - name: Help and support - url: https://github.com/keploy/keploy#community-support - about: Reach out to us on our Slack channel or Discourse discussions or GitHub discussions. - - name: Dedicated support - url: mailto:hello@keploy.io +contact_links: + - name: Help and support + url: https://github.com/keploy/keploy#community-support + about: Reach out to us on our Slack channel or Discourse discussions or GitHub discussions. + - name: Dedicated support + url: mailto:hello@keploy.io about: Write to us if you'd like dedicated support using Keploy \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index e598997..dd632b7 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,40 +1,40 @@ -# Pull Request Template - -## Description - -Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. - -Fixes # (issue) - -## Type of change - -Please delete options that are not relevant. - -- [ ] Bug fix (non-breaking change which fixes an issue) -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) -- [ ] This change requires a documentation update - -## How Has This Been Tested? - -Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - -## Additional Context (Please include any Screenshots/gifs if relevant) - -... - -## 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 -- [ ] Any dependent changes have been merged and published in downstream modules -- [ ] I have checked my code and corrected any misspellings -- [ ] I have tagged the reviewers in a comment below incase my pull request is ready for a review -- [ ] I have signed the commit message to agree to Developer Certificate of Origin (DCO) (to certify that you wrote or otherwise have the right to submit your contribution to the project.) by adding "--signoff" to my git commit command. - +# Pull Request Template + +## Description + +Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. + +Fixes # (issue) + +## Type of change + +Please delete options that are not relevant. + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] This change requires a documentation update + +## How Has This Been Tested? + +Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration + +## Additional Context (Please include any Screenshots/gifs if relevant) + +... + +## 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 +- [ ] Any dependent changes have been merged and published in downstream modules +- [ ] I have checked my code and corrected any misspellings +- [ ] I have tagged the reviewers in a comment below incase my pull request is ready for a review +- [ ] I have signed the commit message to agree to Developer Certificate of Origin (DCO) (to certify that you wrote or otherwise have the right to submit your contribution to the project.) by adding "--signoff" to my git commit command. + \ No newline at end of file diff --git a/.github/slack.svg b/.github/slack.svg index 6cb641a..75c4493 100644 --- a/.github/slack.svg +++ b/.github/slack.svg @@ -1,20 +1,20 @@ - - slack - - - - - - - - - - - - + + slack + + + + + + + + + + + + \ No newline at end of file diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index deb86fa..a74eac7 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -1,26 +1,26 @@ -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - -name: samples-java build check - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'temurin' - cache: maven - - name: Build with Maven - run: mvn clean install -DskipTests +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: samples-java build check + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn clean install -DskipTests diff --git a/.gitignore b/.gitignore index 9f9901f..b68a8ab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,217 +1,217 @@ - -# Created by https://www.toptal.com/developers/gitignore/api/macos,linux,jetbrains,visualstudiocode -# Edit at https://www.toptal.com/developers/gitignore?templates=macos,linux,jetbrains,visualstudiocode - -### JetBrains ### -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# User-specific stuff -.idea/ -.idea/**/workspace.xml -.idea/**/tasks.xml -.idea/**/usage.statistics.xml -.idea/**/dictionaries -.idea/**/shelf - -# AWS User-specific -.idea/**/aws.xml - -# Generated files -.idea/**/contentModel.xml - -# Sensitive or high-churn files -.idea/**/dataSources/ -.idea/**/dataSources.ids -.idea/**/dataSources.local.xml -.idea/**/sqlDataSources.xml -.idea/**/dynamic.xml -.idea/**/uiDesigner.xml -.idea/**/dbnavigator.xml - -# Gradle -.idea/**/gradle.xml -.idea/**/libraries - -# Gradle and Maven with auto-import -# When using Gradle or Maven with auto-import, you should exclude module files, -# since they will be recreated, and may cause churn. Uncomment if using - auto-import. - .idea/artifacts - .idea/compiler.xml - .idea/jarRepositories.xml - .idea/modules.xml - .idea/*.iml - .idea/modules - *.iml - *.ipr - -# CMake -cmake-build-*/ - -# Mongo Explorer plugin -.idea/**/mongoSettings.xml - -# File-based project format -*.iws - -# IntelliJ -out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Cursive Clojure plugin -.idea/replstate.xml - -# SonarLint plugin -.idea/sonarlint/ - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - -# Editor-based Rest Client -.idea/httpRequests - -# Android studio 3.1+ serialized cache file -.idea/caches/build_file_checksums.ser - -### JetBrains Patch ### -# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 - -# *.iml -# modules.xml -# .idea/misc.xml -# *.ipr - -# Sonarlint plugin -# https://plugins.jetbrains.com/plugin/7973-sonarlint -.idea/**/sonarlint/ - -# SonarQube Plugin -# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin -.idea/**/sonarIssues.xml - -# Markdown Navigator plugin -# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced -.idea/**/markdown-navigator.xml -.idea/**/markdown-navigator-enh.xml -.idea/**/markdown-navigator/ - -# Cache file creation bug -# See https://youtrack.jetbrains.com/issue/JBR-2257 -.idea/$CACHE_FILE$ - -# CodeStream plugin -# https://plugins.jetbrains.com/plugin/12206-codestream -.idea/codestream.xml - -### Linux ### -*~ - -# temporary files which can be created if a process still has a handle open of a deleted file -.fuse_hidden* - -# KDE directory preferences -.directory - -# Linux trash folder which might appear on any partition or disk -.Trash-* - -# .nfs files are created when an open file is removed but is still being accessed -.nfs* - -### macOS ### -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -### VisualStudioCode ### -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -!.vscode/*.code-snippets - -# Local History for Visual Studio Code -.history/ - -# Built Visual Studio Code Extensions -*.vsix - -### VisualStudioCode Patch ### -# Ignore all local history of files -.history -.ionide -.env -target/springbootapp-0.0.1-SNAPSHOT.jar -target/springbootapp-0.0.1-SNAPSHOT.jar.original -.jar -# Support for Project snippet scope - -# End of https://www.toptal.com/developers/gitignore/api/macos,linux,jetbrains,visualstudiocode - -HELP.md -target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/**/target/ -!**/src/test/**/target/ - -### STS ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans -.sts4-cache - -### IntelliJ IDEA ### -.idea -*.iws -*.iml -*.ipr - -### NetBeans ### -/nbproject/private/ -/nbbuild/ -/dist/ -/nbdist/ -/.nb-gradle/ -build/ -!**/src/main/**/build/ -!**/src/test/**/build/ - -### VS Code ### -.vscode/ + +# Created by https://www.toptal.com/developers/gitignore/api/macos,linux,jetbrains,visualstudiocode +# Edit at https://www.toptal.com/developers/gitignore?templates=macos,linux,jetbrains,visualstudiocode + +### JetBrains ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/ +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using + auto-import. + .idea/artifacts + .idea/compiler.xml + .idea/jarRepositories.xml + .idea/modules.xml + .idea/*.iml + .idea/modules + *.iml + *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### JetBrains Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +# *.iml +# modules.xml +# .idea/misc.xml +# *.ipr + +# Sonarlint plugin +# https://plugins.jetbrains.com/plugin/7973-sonarlint +.idea/**/sonarlint/ + +# SonarQube Plugin +# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin +.idea/**/sonarIssues.xml + +# Markdown Navigator plugin +# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced +.idea/**/markdown-navigator.xml +.idea/**/markdown-navigator-enh.xml +.idea/**/markdown-navigator/ + +# Cache file creation bug +# See https://youtrack.jetbrains.com/issue/JBR-2257 +.idea/$CACHE_FILE$ + +# CodeStream plugin +# https://plugins.jetbrains.com/plugin/12206-codestream +.idea/codestream.xml + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide +.env +target/springbootapp-0.0.1-SNAPSHOT.jar +target/springbootapp-0.0.1-SNAPSHOT.jar.original +.jar +# Support for Project snippet scope + +# End of https://www.toptal.com/developers/gitignore/api/macos,linux,jetbrains,visualstudiocode + +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 7ac5b80..0409f81 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,128 +1,128 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, religion, or sexual identity -and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -* Focusing on what is best not just for us as individuals, but for the - overall community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery, and sexual attention or - advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email - address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -hello@keploy.io. -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series -of actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or -permanent ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within -the community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.0, available at -https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. - -Community Impact Guidelines were inspired by [Mozilla's code of conduct -enforcement ladder](https://github.com/mozilla/diversity). - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at -https://www.contributor-covenant.org/translations. +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +hello@keploy.io. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9f4c009..8c13001 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,27 +1,27 @@ -# Contributing to Keploy - -Thank you for your interest in Keploy and for taking the time to contribute to this project. 🙌 -Keploy is a project by developers for developers and there are a lot of ways you can contribute. -If you don't know where to start contributing, ask us on our [Slack channel](https://join.slack.com/t/keploy/shared_invite/zt-12rfbvc01-o54cOG0X1G6eVJTuI_orSA). - -## Code of conduct - -Read our [Code of Conduct](CODE_OF_CONDUCT.md) before contributing - -## How can I contribute? - -There are many ways in which you can contribute to Keploy. - -#### 🐛 Report a bug -Report all issues through GitHub Issues using the [Report a Bug](https://github.com/keploy/keploy/issues/new?assignees=&labels=&template=bug_report.md&title=) template. -To help resolve your issue as quickly as possible, read the template and provide all the requested information. - -#### 🛠 File a feature request -We welcome all feature requests, whether it's to add new functionality to an existing extension or to offer an idea for a brand new extension. -File your feature request through GitHub Issues using the [Feature Request](https://github.com/keploy/keploy/issues/new?assignees=&labels=&template=feature_request.md&title=) template. - -#### 📝 Improve the documentation -In the process of shipping features quickly, we may forget to keep our docs up to date. You can help by suggesting improvements to our documentation using the [Documentation Improvement](https://github.com/keploy/docs/issues) template! - -#### ⚙️ Close a Bug / Feature issue +# Contributing to Keploy + +Thank you for your interest in Keploy and for taking the time to contribute to this project. 🙌 +Keploy is a project by developers for developers and there are a lot of ways you can contribute. +If you don't know where to start contributing, ask us on our [Slack channel](https://join.slack.com/t/keploy/shared_invite/zt-12rfbvc01-o54cOG0X1G6eVJTuI_orSA). + +## Code of conduct + +Read our [Code of Conduct](CODE_OF_CONDUCT.md) before contributing + +## How can I contribute? + +There are many ways in which you can contribute to Keploy. + +#### 🐛 Report a bug +Report all issues through GitHub Issues using the [Report a Bug](https://github.com/keploy/keploy/issues/new?assignees=&labels=&template=bug_report.md&title=) template. +To help resolve your issue as quickly as possible, read the template and provide all the requested information. + +#### 🛠 File a feature request +We welcome all feature requests, whether it's to add new functionality to an existing extension or to offer an idea for a brand new extension. +File your feature request through GitHub Issues using the [Feature Request](https://github.com/keploy/keploy/issues/new?assignees=&labels=&template=feature_request.md&title=) template. + +#### 📝 Improve the documentation +In the process of shipping features quickly, we may forget to keep our docs up to date. You can help by suggesting improvements to our documentation using the [Documentation Improvement](https://github.com/keploy/docs/issues) template! + +#### ⚙️ Close a Bug / Feature issue We welcome contributions that help make keploy bug free & improve the experience of our users. You can also find issues tagged [Good First Issues](https://github.com/keploy/keploy/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). \ No newline at end of file diff --git a/Contributing/How-To-Create-a-Repository.md b/Contributing/How-To-Create-a-Repository.md index 0c7968b..d50acf2 100644 --- a/Contributing/How-To-Create-a-Repository.md +++ b/Contributing/How-To-Create-a-Repository.md @@ -1,20 +1,20 @@ -# Create Repository - -A repository contains all of your project's files and each file's revision history. You can discuss and manage your project's work within the repository. Keploy uses repositories to store files, revision history, carry out discussions, manage the project work and accept contributions from our diverse contributors. To get started with creating a repository, please follow these steps: - -If you are a member of the keploy organization, define a new repository: - -- Use a short version of your title as the repository name: keploy/repository-name. -- Use the full title as the description of the repository. -- Make the repository public. -- Instead of initialising it with a README. We can directly select this template repository while creating a new public repo as the base. -- Create your repository. -- If you are not a member of the Keploy organization, the Keploy team will create the repository for you and invite you as an external member to take charge of the project. Follow these steps: - -Navigate to the template repository. -Click Issues. -Click the green button Get Started in the Feature Request box. -Use the title of your project as the title of the requested features. -In the body of the Issue, provide the abstract of your project first. Then follow the template to the extent it is useful and provide as much information as possible. -Attach files, screenshots and/or animated GIFs +# Create Repository + +A repository contains all of your project's files and each file's revision history. You can discuss and manage your project's work within the repository. Keploy uses repositories to store files, revision history, carry out discussions, manage the project work and accept contributions from our diverse contributors. To get started with creating a repository, please follow these steps: + +If you are a member of the keploy organization, define a new repository: + +- Use a short version of your title as the repository name: keploy/repository-name. +- Use the full title as the description of the repository. +- Make the repository public. +- Instead of initialising it with a README. We can directly select this template repository while creating a new public repo as the base. +- Create your repository. +- If you are not a member of the Keploy organization, the Keploy team will create the repository for you and invite you as an external member to take charge of the project. Follow these steps: + +Navigate to the template repository. +Click Issues. +Click the green button Get Started in the Feature Request box. +Use the title of your project as the title of the requested features. +In the body of the Issue, provide the abstract of your project first. Then follow the template to the extent it is useful and provide as much information as possible. +Attach files, screenshots and/or animated GIFs Click the green button "Submit New Issue" at the bottom right corner. \ No newline at end of file diff --git a/Contributing/How-To-Do-Continuous-Integration.md b/Contributing/How-To-Do-Continuous-Integration.md index b9c8205..b9304e8 100644 --- a/Contributing/How-To-Do-Continuous-Integration.md +++ b/Contributing/How-To-Do-Continuous-Integration.md @@ -1,14 +1,14 @@ -# Continuous Integration Tools - -Continuous integration is a DevOps software development practice where developers regularly merge their code changes into a central repository, after which automated builds and tests are run. - -While not yet implemented, Keploy intends to utilise Continuous Integration Tools. Continuous Integration allows multiple developers to work on a software project while integrating their changes and maintaining the stability and quality of the software. - -Continuous Integration fosters innovation by ensuring that ongoing improvements are always available and compatible to a set of users. This would allow a user developing their own countries implementation could progressively add new data and features while maintaining a functioning, reproducible system - -Two Integration Tools have been identified for Continuous Integration with Keploy: - -- We use Github Actions to supports Continuous Integration and testing . - - - +# Continuous Integration Tools + +Continuous integration is a DevOps software development practice where developers regularly merge their code changes into a central repository, after which automated builds and tests are run. + +While not yet implemented, Keploy intends to utilise Continuous Integration Tools. Continuous Integration allows multiple developers to work on a software project while integrating their changes and maintaining the stability and quality of the software. + +Continuous Integration fosters innovation by ensuring that ongoing improvements are always available and compatible to a set of users. This would allow a user developing their own countries implementation could progressively add new data and features while maintaining a functioning, reproducible system + +Two Integration Tools have been identified for Continuous Integration with Keploy: + +- We use Github Actions to supports Continuous Integration and testing . + + + diff --git a/LICENSE b/LICENSE index c20e7bd..5a65af0 100644 --- a/LICENSE +++ b/LICENSE @@ -1,201 +1,201 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2022 Keploy Inc - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2022 Keploy Inc + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md deleted file mode 100644 index 135a427..0000000 --- a/README.md +++ /dev/null @@ -1,354 +0,0 @@ -# Example Employee-Manager App - -A sample Employee-Manager app to test Keploy integration capabilities using [SpringBoot](https://spring.io) and -[PostgreSQL](https://www.postgresql.org/). - -**Note** :- Issue Creation is disabled on this Repository, please visit [here](https://github.com/keploy/keploy/issues/new/choose) to submit Issue. - -## Pre-requisites - -- [Java 8+](https://docs.spring.io/spring-boot/docs/current/reference/html/getting-started.html#getting-started.installing) - -## Quick Installation of "KEPLOY" server - -### **MacOS** - -
-MacOS - -```shell -curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_darwin_all.tar.gz" | tar xz -C /tmp - -sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy -``` - -
- -### **Linux** - -
-Linux - -```shell -curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz -C /tmp - -sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy -``` - -
- -
-Linux ARM - -```shell -curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz -C /tmp - -sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy -``` - - -
- -### **Windows** - -
-Windows - -- Download - the [Keploy Windows AMD64](https://github.com/keploy/keploy/releases/latest/download/keploy_windows_amd64.tar.gz), and - extract the files from the zip folder. -- Run the `keploy.exe` file. - -
- -
-Windows ARM - -- Download - the [Keploy Windows ARM64](https://github.com/keploy/keploy/releases/latest/download/keploy_windows_arm64.tar.gz), and - extract the files from the zip folder. -- Run the `keploy.exe` file. - -
- -## Build configuration - -[Find the latest release](https://search.maven.org/artifact/io.keploy/keploy-sdk) of the Keploy Java SDK at maven -central. - -Add *keploy-sdk* as a dependency to your *pom.xml*: - - - io.keploy - keploy-sdk - N.N.N (eg: 1.2.8) - - -or to *build.gradle*: - - implementation 'io.keploy:keploy-sdk:N.N.N' (eg: 1.2.8) - -## Usage -- Refer [this](https://github.com/gouravkrosx/java-sdk#usage). - -## Setup Employee-Manager App - -```bash -git clone https://github.com/keploy/samples-java -``` - -## Agent-jar -Download the latest version (1.2.8) of agent jar from [here](https://central.sonatype.com/artifact/io.keploy/agent/1.2.8) and add this jar to main directory. - - -### Start PostgreSQL instance -Download docker dekstop from [here](https://docs.docker.com/get-docker/). -```bash -docker-compose up -d -``` - -### Maven clean install - -```shell -mvn clean install -Dmaven.test.skip=true -``` - -### Set KEPLOY_MODE to record - -- To record testcases use `KEPLOY_MODE` and `DENOISE` as env variables. Set `KEPLOY` to `record` mode and mark `DENOISE` as `true`. Also add - -`-javaagent:path of agent jar` like this 👇. - - -![Edit_configurations](/src/main/resources/Edit-configurations.png "Edit configurations") - - -## Generate testcases - -To generate testcases we just need to **make some API calls.** You can use [Postman](https://www.postman.com/) -, [Hoppscotch](https://hoppscotch.io/), or simply `curl` - -### 1. Make an employee entry - -```bash -curl --location --request POST 'http://localhost:8080/api/employees' \ ---header 'Content-Type: application/json' \ ---data-raw '{ - "firstName": "Myke", - "lastName": "Tyson", - "email": "mt@gmail.com", - "timestamp":1 -}' -``` - -this will return the response or an entry. The timestamp would automatically be ignored during testing because it'll -always be different. - -``` -{ - "id": 1, - "firstName": "Myke", - "lastName": "Tyson", - "email": "mt@gmail.com", - "timestamp": 1661493301 -} -``` - -### 2. Fetch recorded info about employees - -```bash -curl --location --request GET 'http://localhost:8080/api/employees/1' -``` - -or by querying through the browser `http://localhost:8080/api/employees/1` - -Now both these API calls were captured as **editable** testcases and written to `test/e2e/keploy-tests` folder. The -keploy directory would also have `mocks` folder. - -![testcases](/src/main/resources/test-cases.png "Recorded Test cases and mocks") - -Now, let's see the magic! 🪄💫 - -## Test mode - -There are 2 ways to test the application with Keploy. - -1. [Unit Test File](/README.md#testing-using-unit-test-file) -2. [Without Unit Test File](/README.md#testing-without-using-unit-test-file) - -### **Testing using Unit Test File** - - -- Set `KEPLOY_MODE = test` (default "off") - -_NOTE: You will be required to set the `javaagent` again in your test profile just like below._ - -![run_configuration](./src/main/resources/Run_Configuration.png "Run_Configuration") - -- Now that we have our testcase captured, run the unit test file (`SampleJavaApplication_Test.java`) already present in -the sample app repo. - -- If not present, you can make and add below code in `SampleJavaApplication_Test.java` in the test module of your sample application. - -```java - @Test - public void TestKeploy() throws InterruptedException { - - CountDownLatch countDownLatch = HaltThread.getInstance().getCountDownLatch(); - Mode.setTestMode(); - - new Thread(() -> { - .main(new String[]{""}); - countDownLatch.countDown(); - }).start(); - - countDownLatch.await(); - assertTrue(AssertKTests.result(), "Keploy Test Result"); - } -``` -- **Using IDE:** _(for local use-case we prefer running tests via IDE)_ - 1. Run your application. - 2. You can also run the application with coverage to see the test coverage. - -- **Using command line** - 1. Add maven-surefire-plugin to your *pom.xml*. In ` ` don't add jacoco agent if you don't want coverage report. - - ```xml - - org.apache.maven.plugins - maven-surefire-plugin - 2.22.2 - - - - - -javaagent:.jar - -javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=target/jacoco.exec - - - - target/jacoco.exec - - - - - ``` - - 2. If you want coverage report also add Jacoco plugin to your *pom.xml*. - - ```xml - - org.jacoco - jacoco-maven-plugin - 0.8.7 - - - prepare-agent - - prepare-agent - - - - report - prepare-package - - report - - - - post-unit-test - test - - report - - - - - target/jacoco.exec - - target/my-reports - - - - - ``` - 3. Run your tests using command : `mvn test`. - - -It will create .html files as test-reports which can be found in your target folder !! - -**_We got 53% without writing any testcases. 🎉_** - -Go to the Keploy Console TestRuns Page to get deeper insights on what testcases ran, what failed. - -![testruns](https://i.imgur.com/tg6OT0n.png "Summary") - -### **Testing without using Unit Test File** - -To test using `KEPLOY_MODE` env variable, set the same to `test` mode. - -``` -export KEPLOY_MODE=test -``` - -Now simply run the application either by ide or using command: - -```shell -java -javaagent:.jar -jar .jar -``` - -Keploy will run all the captures test-cases, compare and show the results on the console. - -```shell -10b3ddd5-42fa-48e7-b98a-b47257272e39 total tests: 2 -2022-08-26 14:13:08.993 INFO 11560 --- [ Thread-4] io.keploy.service.GrpcService : testing 1 of 2 testcase id: [ae4a6c91-712a-4566-bf0d-97d708f94b2d] -2022-08-26 14:13:08.994 INFO 11560 --- [ Thread-4] io.keploy.service.GrpcService : testing 2 of 2 testcase id: [4843e03e-76a8-4194-99cb-f62740978d15] -2022-08-26 14:13:09.061 INFO 11560 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet' -2022-08-26 14:13:09.061 INFO 11560 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' -2022-08-26 14:13:09.062 INFO 11560 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms -Hibernate: insert into employees (email, first_name, last_name, timestamp) values (?, ?, ?, ?) -2022-08-26 14:13:09.247 INFO 11560 --- [pool-3-thread-1] io.keploy.service.GrpcService : result : testcase id: [ae4a6c91-712a-4566-bf0d-97d708f94b2d] passed: true -Hibernate: select employee0_.id as id1_0_0_, employee0_.email as email2_0_0_, employee0_.first_name as first_na3_0_0_, employee0_.last_name as last_nam4_0_0_, employee0_.timestamp as timestam5_0_0_ from employees employee0_ where employee0_.id=? -2022-08-26 14:13:09.291 INFO 11560 --- [pool-3-thread-1] io.keploy.service.GrpcService : result : testcase id: [4843e03e-76a8-4194-99cb-f62740978d15] passed: true -2022-08-26 14:13:09.388 INFO 11560 --- [ Thread-4] io.keploy.service.GrpcService : test run completed with run id [1e81233d-e3be-4a4a-afda-a800902ad965] -2022-08-26 14:13:09.388 INFO 11560 --- [ Thread-4] io.keploy.service.GrpcService : || passed overall: TRUE || -2022-08-26 14:13:19.408 INFO 11560 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' -2022-08-26 14:13:19.410 INFO 11560 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... -2022-08-26 14:13:19.414 INFO 11560 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. -``` - -![testruns](/src/main/resources/test-runs-success.png "Recent testruns") - -## Let's add a Bug in the App - -Now let's introduce a bug! Let's try changing something like adding some extra headers in -controllers `./EmployeeController.java` on line 35 like : - -```java -return ResponseEntity.ok().header("MyNewHeader","abc").body(employee); -``` - -Let's run the test-file to see if Keploy catches the regression introduced. - -```shell -mvn test -``` - -You'll notice the failed test-case in the output. - -```shell -2022-08-26 13:10:10.289 TRACE 70155 --- [nio-8080-exec-2] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [BIGINT] - [1] -2022-08-26 13:10:10.307 INFO 70155 --- [pool-3-thread-1] io.keploy.service.GrpcService : result : testcase id: [d42a3724-2c78-4f42-8dc6-d25a9b611c7c] passed: false -2022-08-26 13:10:10.312 INFO 70155 --- [ Thread-1] io.keploy.service.GrpcService : test run completed with run id [fcb61332-1025-463f-854e-6f406bce870d] -2022-08-26 13:10:10.312 INFO 70155 --- [ Thread-1] io.keploy.service.GrpcService : || passed overall: FALSE || -``` - -To deep dive the problem go to [test runs](http://localhost:6789/testruns) - -![testruns](/src/main/resources/test-runs-fail.png "Recent testruns") - - -**In case of any query, refer to video below,** - -[![java-sample](https://user-images.githubusercontent.com/74777863/217864311-94a3dc0c-90bc-4551-aca2-87e82e3d24cb.png)](https://youtu.be/Ssm4TnTkbLs) - diff --git a/SECURITY.md b/SECURITY.md index 3eafe68..4a4eea1 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,9 +1,9 @@ -# Security Policy - -## Reporting a Vulnerability - -We value security for the project very highly. We encourage all users to report any vulnerabilities they discover to us. -If you find a security vulnerability in the Keploy project, please report it responsibly by sending an email to hello@keploy.io - -At this juncture, we don't have a bug bounty program. We are a small team trying to solve a big problem. We urge you to report any vulnerabilities responsibly +# Security Policy + +## Reporting a Vulnerability + +We value security for the project very highly. We encourage all users to report any vulnerabilities they discover to us. +If you find a security vulnerability in the Keploy project, please report it responsibly by sending an email to hello@keploy.io + +At this juncture, we don't have a bug bounty program. We are a small team trying to solve a big problem. We urge you to report any vulnerabilities responsibly so that we can continue building a secure application for the entire community. \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml deleted file mode 100644 index 1b3d8cb..0000000 --- a/docker-compose.yaml +++ /dev/null @@ -1,15 +0,0 @@ -version: '3.7' -services: - postgres: - image: postgres:10.5 - restart: always - environment: - - POSTGRES_DB=keploy-test - - POSTGRES_USER=keploy-user - - POSTGRES_PASSWORD=keploy - ports: - - '5439:5432' - volumes: - # - ./postgres-data:/var/lib/postgresql/data - # copy the sql script to create tables - - ./src/main/resources/data.sql:/docker-entrypoint-datadb.d/data.sql \ No newline at end of file diff --git a/pom.xml b/pom.xml index 54dd38d..6a0fabe 100644 --- a/pom.xml +++ b/pom.xml @@ -1,218 +1,116 @@ - - - 4.0.0 - - org.springframework.boot - spring-boot-starter-parent - 2.7.3 - - - com.example - springbootapp - 0.0.1-SNAPSHOT - samples_java - Spring Boot PostgreSQL JPA, Hibernate CRUD Restful API example - - 1.8 - - - - org.springframework - spring-context - 5.3.22 - - - - org.springframework - spring-webmvc - 5.3.22 - - - - - io.keploy - keploy-sdk - 1.2.8 - - - - - org.mariadb.jdbc - mariadb-java-client - 2.7.1 - - - org.springframework.boot - spring-boot-starter-data-jpa - ${project.parent.version} - - - org.springframework.boot - spring-boot-starter-web - ${project.parent.version} - - - org.postgresql - postgresql - 42.5.0 - runtime - - - org.springframework.boot - spring-boot-starter-test - ${project.parent.version} - test - - - org.springframework.boot - spring-boot-starter-validation - ${project.parent.version} - - - com.newrelic.agent.java - newrelic-java - 7.7.0 - provided - zip - - - - org.springframework - spring-test - 5.3.22 - test - - - org.projectlombok - lombok - 1.18.24 - provided - - - - com.oracle.database.jdbc - ojdbc5 - 11.2.0.4 - - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${project.parent.version} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - 3.1.1 - - - copy-dependencies - package - - copy-dependencies - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - dependency/ - com.example.demo.SamplesJavaApplication - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.22.2 - - - - - -javaagent:/Users/gouravkumar/Desktop/Keploy/KPOCs/google-map-spring-boot-starter/src/main/resources/agentJars/agent-1.2.8.jar - -javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=target/jacoco.exec - - - target/jacoco.exec - - - - - - - org.jacoco - jacoco-maven-plugin - 0.8.7 - - - prepare-agent - - prepare-agent - - - - report - prepare-package - - report - - - - post-unit-test - test - - report - - - - target/jacoco.exec - - target/my-reports - - - - - - - - - + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 3.1.4 + + + com.sample_crud + dynamo_db_app + 0.0.1-SNAPSHOT + dynamo_db_app + Demo project for Spring Boot + + 20 + + + + + org.springframework.boot + spring-boot-starter-web + + + javax.servlet + javax.servlet-api + + + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-test + test + + + + org.projectlombok + lombok + 1.18.30 + provided + + + + + com.amazonaws + aws-java-sdk + 1.12.559 + + + + + com.github.derjust + spring-data-dynamodb + 5.1.0 + + + + org.springframework + spring-context + 6.0.12 + + + + io.keploy + java-sdk + 1.2.9 + pom + + + + io.keploy + agent + 1.2.9 + + + + io.keploy + keploy-sdk + 1.2.9 + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/example/demo/SamplesJavaApplication.java b/src/main/java/com/example/demo/SamplesJavaApplication.java deleted file mode 100644 index 76dd17b..0000000 --- a/src/main/java/com/example/demo/SamplesJavaApplication.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.example.demo; - -import io.keploy.servlet.KeployMiddleware; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.Import; - -@SpringBootApplication -@Import(KeployMiddleware.class) -public class SamplesJavaApplication { - public static void main(String[] args) { - SpringApplication.run(SamplesJavaApplication.class, args); - } -} - diff --git a/src/main/java/com/example/demo/controller/EmployeeController.java b/src/main/java/com/example/demo/controller/EmployeeController.java deleted file mode 100644 index 94125b3..0000000 --- a/src/main/java/com/example/demo/controller/EmployeeController.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.example.demo.controller; - -import com.example.demo.exception.ResourceNotFoundException; -import com.example.demo.model.Employee; -import com.example.demo.repository.EmployeeRepository; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; - -import javax.validation.Valid; -import java.time.Instant; -import java.util.HashMap; -import java.util.List; - -@RestController -@RequestMapping("/api/") -public class EmployeeController { - - @Autowired - private EmployeeRepository employeeRepository; - -// //get employees -// @GetMapping("employees") -// public List getAllEmployee() { -// return this.employeeRepository.findAll(); -// } - - //get employee by id - @GetMapping("employees/{id}") - public ResponseEntity getEmployeeById(@PathVariable(value = "id") Long employeeId) throws ResourceNotFoundException { - Employee employee = employeeRepository.findById(employeeId).orElseThrow(() -> new ResourceNotFoundException("Employee not found for this id :: " + employeeId)); - return ResponseEntity.ok().body(employee); - } - - //save employee - @PostMapping("employees") - public Employee createEmployee(@RequestBody Employee employee) { - employee.setTimestamp(Instant.now().getEpochSecond()); - return this.employeeRepository.save(employee); - } - -// //update employee -// @PutMapping("employees/{id}") -// public ResponseEntity updateEmployee(@PathVariable(value = "id") Long employeeId, @Valid @RequestBody Employee employeeDetails) throws ResourceNotFoundException { -// -// Employee employee = employeeRepository.findById(employeeId).orElseThrow(() -> new ResourceNotFoundException("Employee not found for this id :: " + employeeId)); -// employee.setEmail(employeeDetails.getEmail()); -// employee.setFirstName(employeeDetails.getFirstName()); -// employee.setLastName(employeeDetails.getLastName()); -// employee.setTimestamp(Instant.now().getEpochSecond()); -// return ResponseEntity.ok(this.employeeRepository.save(employee)); -// } -// -// //delete employee -// @DeleteMapping("employees/{id}") -// public Map deleteEmployee(@PathVariable(value = "id") Long employeeId) throws ResourceNotFoundException { -// Employee employee = employeeRepository.findById(employeeId).orElseThrow(() -> new ResourceNotFoundException("Employee not found for this id :: " + employeeId)); -// this.employeeRepository.delete(employee); -// Map response = new HashMap<>(); -// response.put("deleted", Boolean.TRUE); -// -// return response; -// } -} \ No newline at end of file diff --git a/src/main/java/com/example/demo/exception/ErrorDetails.java b/src/main/java/com/example/demo/exception/ErrorDetails.java deleted file mode 100644 index b8a69d2..0000000 --- a/src/main/java/com/example/demo/exception/ErrorDetails.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.example.demo.exception; - -import lombok.Getter; -import lombok.Setter; - -import java.util.Date; - -@Getter -@Setter -public class ErrorDetails { - private Date timestamp; - private String message; - private String details; - - public ErrorDetails(Date timestamp, String message, String details) { - this.timestamp = timestamp; - this.message = message; - this.details = details; - } -} diff --git a/src/main/java/com/example/demo/exception/GlobalExceptionHandler.java b/src/main/java/com/example/demo/exception/GlobalExceptionHandler.java deleted file mode 100644 index a8520ed..0000000 --- a/src/main/java/com/example/demo/exception/GlobalExceptionHandler.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.example.demo.exception; - -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.ControllerAdvice; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.context.request.WebRequest; - -import java.util.Date; - -@ControllerAdvice -public class GlobalExceptionHandler { - - @ExceptionHandler(ResourceNotFoundException.class) - public ResponseEntity resourceNotFoundException(ResourceNotFoundException ex, WebRequest request) { - ErrorDetails errorDetails = new ErrorDetails(new Date(), ex.getMessage(), request.getDescription(false)); - return new ResponseEntity<>(errorDetails, HttpStatus.NOT_FOUND); - } - - @ExceptionHandler - public ResponseEntity globalExceptionHandler(Exception ex, WebRequest request) { - ErrorDetails errorDetails = new ErrorDetails(new Date(), ex.getMessage(), request.getDescription(false)); - return new ResponseEntity<>(errorDetails, HttpStatus.INTERNAL_SERVER_ERROR); - } -} diff --git a/src/main/java/com/example/demo/exception/ResourceNotFoundException.java b/src/main/java/com/example/demo/exception/ResourceNotFoundException.java deleted file mode 100644 index e54fd08..0000000 --- a/src/main/java/com/example/demo/exception/ResourceNotFoundException.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.demo.exception; - -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.ResponseStatus; - -@ResponseStatus(value = HttpStatus.NOT_FOUND) -public class ResourceNotFoundException extends Exception { - private static final long serialVersionUid = 1L; - - public ResourceNotFoundException(String message) { - super(message); - } -} diff --git a/src/main/java/com/example/demo/model/Employee.java b/src/main/java/com/example/demo/model/Employee.java deleted file mode 100644 index 6831bec..0000000 --- a/src/main/java/com/example/demo/model/Employee.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.example.demo.model; - -import lombok.Getter; -import lombok.Setter; - -import javax.persistence.*; - -@Entity -@Getter -@Setter -@Table(name = "employees") -public class Employee { - - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - private long id; - - @Column(name = "first_name") - private String firstName; - @Column(name = "last_name") - private String lastName; - @Column(name = "email") - private String email; - @Column(name = "timestamp") - private long timestamp; - - public Employee() { - super(); - } -} diff --git a/src/main/java/com/example/demo/repository/EmployeeRepository.java b/src/main/java/com/example/demo/repository/EmployeeRepository.java deleted file mode 100644 index c9e3e8c..0000000 --- a/src/main/java/com/example/demo/repository/EmployeeRepository.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.demo.repository; - -import com.example.demo.model.Employee; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.stereotype.Repository; - -@Repository -public interface EmployeeRepository extends JpaRepository { - -} diff --git a/src/main/java/com/sample_crud/dynamo_db_app/DynamoDbAppApplication.java b/src/main/java/com/sample_crud/dynamo_db_app/DynamoDbAppApplication.java new file mode 100644 index 0000000..bf7c38b --- /dev/null +++ b/src/main/java/com/sample_crud/dynamo_db_app/DynamoDbAppApplication.java @@ -0,0 +1,16 @@ +package com.sample_crud.dynamo_db_app; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +// import org.springframework.context.annotation.Import; +// import io.keploy.servlet.KeployMiddleware; + +@SpringBootApplication +// @Import(KeployMiddleware.class) +public class DynamoDbAppApplication { + + public static void main(String[] args) { + SpringApplication.run(DynamoDbAppApplication.class, args); + } + +} diff --git a/src/main/java/com/sample_crud/dynamo_db_app/config/DynamoDBConfig.java b/src/main/java/com/sample_crud/dynamo_db_app/config/DynamoDBConfig.java new file mode 100644 index 0000000..6e8f18d --- /dev/null +++ b/src/main/java/com/sample_crud/dynamo_db_app/config/DynamoDBConfig.java @@ -0,0 +1,36 @@ +package com.sample_crud.dynamo_db_app.config; + +import org.springframework.context.annotation.Bean; +import com.amazonaws.auth.AWSStaticCredentialsProvider; +import com.amazonaws.auth.BasicAWSCredentials; +import com.amazonaws.client.builder.AwsClientBuilder; +import com.amazonaws.services.dynamodbv2.AmazonDynamoDB; +import com.amazonaws.services.dynamodbv2.AmazonDynamoDBClientBuilder; +import org.socialsignin.spring.data.dynamodb.repository.config.EnableDynamoDBRepositories; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; + +@Configuration +@EnableDynamoDBRepositories(basePackages = "com.sample_crud.dynamo_db_app.repository") +public class DynamoDBConfig { + @Value("${amazon.dynamodb.endpoint}") + String endpoint; + @Value("${amazon.aws.accesskey}") + String accesskey; + @Value("${amazon.aws.secretkey}") + String secretkey; + @Value("${amazon.aws.region}") + String region; + + @Bean + public AmazonDynamoDB amazonDynamoDB() { + return AmazonDynamoDBClientBuilder + .standard() + .withEndpointConfiguration( + new AwsClientBuilder.EndpointConfiguration(endpoint,region)) + .withCredentials(new AWSStaticCredentialsProvider( + new BasicAWSCredentials(accesskey,secretkey))) + .build(); + } + +} \ No newline at end of file diff --git a/src/main/java/com/sample_crud/dynamo_db_app/config/SSLTest.java b/src/main/java/com/sample_crud/dynamo_db_app/config/SSLTest.java new file mode 100644 index 0000000..ebfad09 --- /dev/null +++ b/src/main/java/com/sample_crud/dynamo_db_app/config/SSLTest.java @@ -0,0 +1,49 @@ +package com.sample_crud.dynamo_db_app.config; + +// import java.net.URL; +// import java.security.SecureRandom; +// import java.security.cert.CertificateException; +// import java.security.cert.X509Certificate; +// import javax.net.ssl.HostnameVerifier; +// import javax.net.ssl.HttpsURLConnection; +// import javax.net.ssl.KeyManager; +// import javax.net.ssl.SSLContext; +// import javax.net.ssl.SSLSession; +// import javax.net.ssl.TrustManager; +// import javax.net.ssl.X509TrustManager; + +// public class SSLTest { + +// public static void main(String [] args) throws Exception { +// // configure the SSLContext with a TrustManager +// SSLContext ctx = SSLContext.getInstance("TLS"); +// ctx.init(new KeyManager[0], new TrustManager[] {new DefaultTrustManager()}, new SecureRandom()); +// SSLContext.setDefault(ctx); + +// URL url = new URL("https://mms.nw.ru"); +// HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); +// conn.setHostnameVerifier(new HostnameVerifier() { +// @Override +// public boolean verify(String arg0, SSLSession arg1) { +// return true; +// } +// }); +// System.out.println(conn.getResponseCode()); +// conn.disconnect(); +// } + +// private static class DefaultTrustManager implements X509TrustManager { + +// @Override +// public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {} + +// @Override +// public void checkServerTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {} + +// @Override +// public X509Certificate[] getAcceptedIssuers() { +// return null; +// } +// } +// } + diff --git a/src/main/java/com/sample_crud/dynamo_db_app/controller/ProductController.java b/src/main/java/com/sample_crud/dynamo_db_app/controller/ProductController.java new file mode 100644 index 0000000..203a5a5 --- /dev/null +++ b/src/main/java/com/sample_crud/dynamo_db_app/controller/ProductController.java @@ -0,0 +1,46 @@ +package com.sample_crud.dynamo_db_app.controller; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import com.sample_crud.dynamo_db_app.entity.Product; +import com.sample_crud.dynamo_db_app.service.ProductService; +import java.util.List; + +@RestController +// @RequestMapping("/api") + +public class ProductController { + + // @GetMapping("/hello") + // public String sayHello() { + // return "Hello, World!"; + // } + + + @Autowired + ProductService productService; + + @PostMapping("/product") + public ResponseEntity saveProduct(@RequestBody Product product){ + return ResponseEntity.ok(productService.saveProduct(product)); + } + + @GetMapping("/product/{id}") + public ResponseEntity getProductById(@PathVariable String id){ + return ResponseEntity.ok(productService.getProductById(id)); + } + + @GetMapping("/products") + public ResponseEntity> getProductList(){ + return ResponseEntity.ok(productService.getProductList()); + } + @PutMapping("/product/{id}") + public ResponseEntity updateProduct(@PathVariable String id,@RequestBody Product product){ + return ResponseEntity.ok(productService.updateProduct(id,product)); + } + @DeleteMapping("/product/{id}") + public void deleteProductById(@PathVariable String id){ + productService.deleteProduct(id); + } +} diff --git a/src/main/java/com/sample_crud/dynamo_db_app/entity/Product.java b/src/main/java/com/sample_crud/dynamo_db_app/entity/Product.java new file mode 100644 index 0000000..9a0d37b --- /dev/null +++ b/src/main/java/com/sample_crud/dynamo_db_app/entity/Product.java @@ -0,0 +1,28 @@ +package com.sample_crud.dynamo_db_app.entity; + +import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBAttribute; +import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBAutoGeneratedKey; +import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBHashKey; +import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTable; +import lombok.Data; + +@DynamoDBTable(tableName = "products") // validates if the DynamoDB table exists or not.DynamoDB does not create collection automatically so it is important to create dynamodb before hand + +@Data +public class Product { + + @DynamoDBHashKey(attributeName = "id") //marking a property as the hash key for a modeled class + @DynamoDBAutoGeneratedKey //for making the hashkey property to autogenerate the key & it supports String type only + private String id; + + @DynamoDBAttribute(attributeName = "name") //Maps a property to dynamodb table attribute. + private String productName; + + @DynamoDBAttribute(attributeName = "category") + private String category; + + @DynamoDBAttribute(attributeName = "price") + private float price; + + +} diff --git a/src/main/java/com/sample_crud/dynamo_db_app/exception/ResourceNotFoundException.java b/src/main/java/com/sample_crud/dynamo_db_app/exception/ResourceNotFoundException.java new file mode 100644 index 0000000..d790374 --- /dev/null +++ b/src/main/java/com/sample_crud/dynamo_db_app/exception/ResourceNotFoundException.java @@ -0,0 +1,7 @@ +package com.sample_crud.dynamo_db_app.exception; + +public class ResourceNotFoundException extends RuntimeException{ + public ResourceNotFoundException(String msg) { + super(msg); + } +} diff --git a/src/main/java/com/sample_crud/dynamo_db_app/repository/ProductRepository.java b/src/main/java/com/sample_crud/dynamo_db_app/repository/ProductRepository.java new file mode 100644 index 0000000..7e0a88d --- /dev/null +++ b/src/main/java/com/sample_crud/dynamo_db_app/repository/ProductRepository.java @@ -0,0 +1,11 @@ +package com.sample_crud.dynamo_db_app.repository; + +import org.socialsignin.spring.data.dynamodb.repository.EnableScan; +import org.springframework.data.repository.CrudRepository; +import org.springframework.stereotype.Repository; +import com.sample_crud.dynamo_db_app.entity.Product; + +@Repository +@EnableScan +public interface ProductRepository extends CrudRepository { +} diff --git a/src/main/java/com/sample_crud/dynamo_db_app/service/ProductService.java b/src/main/java/com/sample_crud/dynamo_db_app/service/ProductService.java new file mode 100644 index 0000000..1829c11 --- /dev/null +++ b/src/main/java/com/sample_crud/dynamo_db_app/service/ProductService.java @@ -0,0 +1,12 @@ +package com.sample_crud.dynamo_db_app.service; + +import java.util.List; +import com.sample_crud.dynamo_db_app.entity.Product; + +public interface ProductService { + List getProductList(); + Product saveProduct(Product product); + Product getProductById(String id); + Product updateProduct(String id,Product product); + void deleteProduct(String id); +} diff --git a/src/main/java/com/sample_crud/dynamo_db_app/service/ProductServiceImpl.java b/src/main/java/com/sample_crud/dynamo_db_app/service/ProductServiceImpl.java new file mode 100644 index 0000000..b4f8265 --- /dev/null +++ b/src/main/java/com/sample_crud/dynamo_db_app/service/ProductServiceImpl.java @@ -0,0 +1,46 @@ +package com.sample_crud.dynamo_db_app.service; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.sample_crud.dynamo_db_app.entity.Product; +import com.sample_crud.dynamo_db_app.repository.ProductRepository; +import com.sample_crud.dynamo_db_app.exception.ResourceNotFoundException; +import java.util.List; + +@Service +public class ProductServiceImpl implements ProductService{ + + @Autowired + ProductRepository productRepository; + + @Override + public List getProductList() { + return (List) productRepository.findAll(); + } + + @Override + public Product saveProduct(Product product) { + return productRepository.save(product); + } + + @Override + public Product getProductById(String id) { + return productRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Product Not Found :" + id)); + } + + @Override + public Product updateProduct(String id, Product product) { + productRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Product Not Found"+id)); + product.setId(id); + return productRepository.save(product); + } + + @Override + public void deleteProduct(String id) { + productRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Product Not Found :"+id)); + productRepository.deleteById(id); + } +} diff --git a/src/main/resources/Edit-configurations.png b/src/main/resources/Edit-configurations.png deleted file mode 100644 index cc70a9c..0000000 Binary files a/src/main/resources/Edit-configurations.png and /dev/null differ diff --git a/src/main/resources/Run_Configuration.png b/src/main/resources/Run_Configuration.png deleted file mode 100644 index c125781..0000000 Binary files a/src/main/resources/Run_Configuration.png and /dev/null differ diff --git a/src/main/resources/Video.png b/src/main/resources/Video.png deleted file mode 100644 index 3625936..0000000 Binary files a/src/main/resources/Video.png and /dev/null differ diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 8dfd91c..370eb4c 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,18 +1,16 @@ -spring.datasource.url=jdbc:postgresql://localhost:5439/keploy-test -spring.datasource.username=keploy-user -spring.datasource.password=keploy -#spring.jpa.show-sql=true -#spring.datasource.driverClassName=io.keploy.ksql.KDriver -spring.jpa.properties.hibernate.format_sql=true -## Hibernate Properties -# The SQL dialect makes Hibernate generate better SQL for the chosen database -spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect -#Hibernate ddl auto (create, create-drop, validate, update) -spring.jpa.hibernate.ddl-auto=update - -# in order to populate some initial data for testing mark it as true. -#spring.jpa.defer-datasource-initialization=true -#spring.sql.init.mode=always - -server.port=8080 -logging.level.root=INFO \ No newline at end of file +server.port = 9090 + +# AWS properties +amazon.dynamodb.endpoint = dynamodb.us-east-1.amazonaws.com +amazon.aws.accesskey = +amazon.aws.secretkey = +amazon.aws.region = us-east-1 +logging.level.root=INFO + +# server.ssl.enabled=true +# server.ssl.key-store-type=PKCS12 +# server.ssl.key-store=classpath:keystore.p12 +# server.ssl.key-store-password=password +# server.ssl.trust-store=classpath:truststore.p12 +# server.ssl.trust-store-password=password +# server.ssl.protocol=TLS \ No newline at end of file diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql deleted file mode 100644 index 458934f..0000000 --- a/src/main/resources/data.sql +++ /dev/null @@ -1,18 +0,0 @@ - -delete from employees; - - -insert into employees -values (1, 'Gourav', 'Kumar', 'gkrosx@gmail.com', 1661500330); -insert into employees -values (2, 'Sarthak', 'Sharma', 'ss@gmail.com', 1661500450); -insert into employees -values (3, 'Ritik', 'Jain', 'rj@gmail.com', 1661500810); -insert into employees -values (4, 'Shashank', 'Pandey', 'sp@gmail.com', 1661500960); -insert into employees -values (5, 'Akshit', 'Taneja', 'at@gmail.com', 1661501190); - - - -SELECT pg_catalog.setval(pg_get_serial_sequence('employees', 'id'), MAX(id)) FROM employees; diff --git a/src/main/resources/test-cases.png b/src/main/resources/test-cases.png deleted file mode 100644 index 8b809bf..0000000 Binary files a/src/main/resources/test-cases.png and /dev/null differ diff --git a/src/main/resources/test-runs-fail.png b/src/main/resources/test-runs-fail.png deleted file mode 100644 index 77549d6..0000000 Binary files a/src/main/resources/test-runs-fail.png and /dev/null differ diff --git a/src/main/resources/test-runs-success.png b/src/main/resources/test-runs-success.png deleted file mode 100644 index 8626055..0000000 Binary files a/src/main/resources/test-runs-success.png and /dev/null differ diff --git a/src/test/e2e/keploy-tests/test-1.yaml b/src/test/e2e/keploy-tests/test-1.yaml deleted file mode 100644 index febe843..0000000 --- a/src/test/e2e/keploy-tests/test-1.yaml +++ /dev/null @@ -1,41 +0,0 @@ -version: api.keploy.io/v1beta2 -kind: Http -name: test-1 -spec: - metadata: {} - req: - method: POST - proto_major: 1 - proto_minor: 1 - url: /api/employees - header: - accept: '*/*' - content-length: "100" - content-type: application/json - host: localhost:8080 - user-agent: curl/7.86.0 - body: |- - { - "firstName": "Myke", - "lastName": "Tyson", - "email": "mt@gmail.com", - "timestamp":1 - } - body_type: utf-8 - resp: - status_code: 200 - header: {} - body: '{"id":1,"firstName":"Myke","lastName":"Tyson","email":"mt@gmail.com","timestamp":1677672085}' - body_type: utf-8 - status_message: OK - proto_major: 1 - proto_minor: 1 - objects: - - type: error - data: H4sIAAAAAAAA/wEAAP//AAAAAAAAAAA= - mocks: - - mock-1-0 - assertions: - noise: - - body.timestamp - created: 1677672085 diff --git a/src/test/e2e/keploy-tests/test-2.yaml b/src/test/e2e/keploy-tests/test-2.yaml deleted file mode 100644 index c6af82b..0000000 --- a/src/test/e2e/keploy-tests/test-2.yaml +++ /dev/null @@ -1,32 +0,0 @@ -version: api.keploy.io/v1beta2 -kind: Http -name: test-2 -spec: - metadata: {} - req: - method: GET - proto_major: 1 - proto_minor: 1 - url: /api/employees/1 - header: - accept: '*/*' - host: localhost:8080 - user-agent: curl/7.86.0 - body: "" - body_type: utf-8 - resp: - status_code: 200 - header: {} - body: '{"id":1,"firstName":"Myke","lastName":"Tyson","email":"mt@gmail.com","timestamp":1677672085}' - body_type: utf-8 - status_message: OK - proto_major: 1 - proto_minor: 1 - objects: - - type: error - data: H4sIAAAAAAAA/wEAAP//AAAAAAAAAAA= - mocks: - - mock-2-0 - assertions: - noise: [] - created: 1677672088 diff --git a/src/test/e2e/mocks/mock-1.yaml b/src/test/e2e/mocks/mock-1.yaml deleted file mode 100644 index ec970b6..0000000 --- a/src/test/e2e/mocks/mock-1.yaml +++ /dev/null @@ -1,18 +0,0 @@ -version: api.keploy.io/v1beta1 -kind: SQL -name: mock-1-0 -spec: - metadata: - getColumnCount: "5" - method: close() - type: TABLE - table: - cols: - - name: id - type: Long - precision: 0 - scale: 0 - rows: - - '[`1`]' - int: 1 - error: [] diff --git a/src/test/e2e/mocks/mock-2.yaml b/src/test/e2e/mocks/mock-2.yaml deleted file mode 100644 index 3cc25c4..0000000 --- a/src/test/e2e/mocks/mock-2.yaml +++ /dev/null @@ -1,30 +0,0 @@ -version: api.keploy.io/v1beta1 -kind: SQL -name: mock-2-0 -spec: - metadata: - SQL-Query: select employee0_.id as id1_0_0_, employee0_.email as email2_0_0_, employee0_.first_name as first_na3_0_0_, employee0_.last_name as last_nam4_0_0_, employee0_.timestamp as timestam5_0_0_ from employees employee0_ where employee0_.id=? - method: next() - type: TABLE - table: - cols: - - name: email2_0_0_ - type: String - precision: 0 - scale: 0 - - name: first_na3_0_0_ - type: String - precision: 0 - scale: 0 - - name: last_nam4_0_0_ - type: String - precision: 0 - scale: 0 - - name: timestam5_0_0_ - type: Long - precision: 0 - scale: 0 - rows: - - '[`mt@gmail.com`|`Myke`|`Tyson`|`1677672085`]' - int: 0 - error: [] diff --git a/src/test/java/SamplesJavaApplication_Test.java b/src/test/java/SamplesJavaApplication_Test.java deleted file mode 100644 index da9d57e..0000000 --- a/src/test/java/SamplesJavaApplication_Test.java +++ /dev/null @@ -1,38 +0,0 @@ -import com.example.demo.SamplesJavaApplication; -import com.example.demo.controller.EmployeeController; -import com.example.demo.repository.EmployeeRepository; -import io.keploy.regression.Mode; -import io.keploy.utils.AssertKTests; -import io.keploy.utils.HaltThread; -import org.junit.jupiter.api.Test; -import org.mockito.InjectMocks; -import org.mockito.Mock; - -import java.util.concurrent.CountDownLatch; - -import static org.junit.jupiter.api.Assertions.*; - - -public class SamplesJavaApplication_Test { - - @Mock - private EmployeeRepository employeeRepository; - - @InjectMocks - private EmployeeController employeeController; - - @Test() - public void TestKeploy() throws InterruptedException { - - CountDownLatch countDownLatch = HaltThread.getInstance().getCountDownLatch(); - Mode.setTestMode(); - - new Thread(() -> { - SamplesJavaApplication.main(new String[]{""}); - countDownLatch.countDown(); - }).start(); - - countDownLatch.await(); - assertTrue(AssertKTests.result()); - } -} diff --git a/src/test/java/com/sample_crud/dynamo_db_app/DynamoDbAppApplicationTests.java b/src/test/java/com/sample_crud/dynamo_db_app/DynamoDbAppApplicationTests.java new file mode 100644 index 0000000..b1e18e9 --- /dev/null +++ b/src/test/java/com/sample_crud/dynamo_db_app/DynamoDbAppApplicationTests.java @@ -0,0 +1,30 @@ +package com.sample_crud.dynamo_db_app; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.concurrent.CountDownLatch; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +import io.keploy.utils.AssertKTests; +import io.keploy.utils.HaltThread; + +@SpringBootTest +class DynamoDbAppApplicationTests { + + // @Test + // public void TestKeploy() throws InterruptedException { + + // CountDownLatch countDownLatch = HaltThread.getInstance().getCountDownLatch(); + + + // new Thread(() -> { + // DynamoDbAppApplication.main(new String[]{""}); + // countDownLatch.countDown(); + // }).start(); + + // countDownLatch.await(); + // assertTrue(AssertKTests.result(), "Keploy Test Result"); + // } + +} diff --git a/target/classes/application.properties b/target/classes/application.properties index 8dfd91c..370eb4c 100644 --- a/target/classes/application.properties +++ b/target/classes/application.properties @@ -1,18 +1,16 @@ -spring.datasource.url=jdbc:postgresql://localhost:5439/keploy-test -spring.datasource.username=keploy-user -spring.datasource.password=keploy -#spring.jpa.show-sql=true -#spring.datasource.driverClassName=io.keploy.ksql.KDriver -spring.jpa.properties.hibernate.format_sql=true -## Hibernate Properties -# The SQL dialect makes Hibernate generate better SQL for the chosen database -spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect -#Hibernate ddl auto (create, create-drop, validate, update) -spring.jpa.hibernate.ddl-auto=update - -# in order to populate some initial data for testing mark it as true. -#spring.jpa.defer-datasource-initialization=true -#spring.sql.init.mode=always - -server.port=8080 -logging.level.root=INFO \ No newline at end of file +server.port = 9090 + +# AWS properties +amazon.dynamodb.endpoint = dynamodb.us-east-1.amazonaws.com +amazon.aws.accesskey = +amazon.aws.secretkey = +amazon.aws.region = us-east-1 +logging.level.root=INFO + +# server.ssl.enabled=true +# server.ssl.key-store-type=PKCS12 +# server.ssl.key-store=classpath:keystore.p12 +# server.ssl.key-store-password=password +# server.ssl.trust-store=classpath:truststore.p12 +# server.ssl.trust-store-password=password +# server.ssl.protocol=TLS \ No newline at end of file