Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Improve Tests #162

Open
wants to merge 65 commits into
base: dev
Choose a base branch
from
Open

Improve Tests #162

wants to merge 65 commits into from

Conversation

attiasas
Copy link
Contributor

@attiasas attiasas commented Sep 1, 2024

  • The pull request is targeting the dev branch.
  • The code has been validated to compile successfully by running go vet ./....
  • The code has been formatted properly using go fmt ./....
  • All static analysis checks passed.
  • All tests have passed. If this feature is not already covered by the tests, new tests have been added.
  • All changes are detailed at the description. if not already covered at JFrog Documentation, new documentation have been added.

General improvements

  • Reduce code duplication in tests when creating temp env based on a given project in test data
  • Enable partial testing using new test flags:

The available test types are (Not supplying flags will run all tests):

Type Description
-test.unit [Optional] Unit tests
-test.artifactory [Optional] Artifactory integration tests
-test.xsc [Optional] XSC integration tests
-test.xray [Optional] Xray commands integration tests
-test.audit [Optional] Audit command general (Jas, MultiTech...) integration tests
-test.audit.JavaScript [Optional] Audit command JavaScript technologies (Npm, Pnpm, Yarn)integration tests
-test.audit.Java [Optional] Audit command Java technologies (Maven, Gradle)integration tests
-test.audit.C [Optional] Audit command C/C++/C# technologies (Nuget/DotNet, Conan)integration tests
-test.audit.Go [Optional] Audit command Go integration tests
-test.audit.Python [Optional] Audit command Python technologies (Pip, PipEnv, Poetry)integration tests
-test.scan [Optional] Other scan commands integration tests
-test.curation [Optional] Curation command integration tests
-test.enrich [Optional] Enrich Command integration tests
-test.git [Optional] Git commands integration tests
-test.dockerScan [Optional] Docker scan command integration tests

Running the tests in CI

  1. Enable parallel tests to improve test times
  2. If one of the tests fails on a flaky tests we don't need to wait for all tests
  3. Don't create Artifactory/Xray objects if not needed for the tests
  4. Added test coverage action
  5. Added Spell Check analysis

Running Tests for development (local) improvements

  1. Curation tests are changing the local dir test data when running tests locally - fixes it.
  2. Allow to run tests and provide the integration information with env vars and not only flags:
  • JFROG_SECURITY_CLI_TESTS_JFROG_URL
  • JFROG_SECURITY_CLI_TESTS_JFROG_ACCESS_TOKEN
  • JFROG_SECURITY_CLI_TESTS_JFROG_USER
  • JFROG_SECURITY_CLI_TESTS_JFROG_PASSWORD

@attiasas attiasas added ignore for release Automatically generated release notes safe to test Approve running integration tests on a pull request labels Sep 1, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Sep 1, 2024
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Sep 5, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Sep 5, 2024
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Sep 5, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Sep 5, 2024
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Sep 26, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Sep 26, 2024
tests/utils/test_utils.go Outdated Show resolved Hide resolved
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Oct 13, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Oct 13, 2024
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Oct 14, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Oct 14, 2024
Copy link

👍 Frogbot scanned this pull request and did not find any new security issues.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignore for release Automatically generated release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants