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

Cli 609 pact testing test api #76

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sandor-trombitas
Copy link
Contributor

Description

Provide description of this PR and changes, if linked Jira ticket doesn't cover it in full.

Checklist

  • Tests added and all succeed
  • Linted
  • README.md updated, if user-facing

🚨After having merged, please update the snyk-ls and CLI go.mod to pull in latest client.

@sandor-trombitas sandor-trombitas requested review from a team as code owners February 12, 2025 12:01
@sandor-trombitas sandor-trombitas force-pushed the CLI-609-pact-testing-test-api branch from c7e2f2d to 1810658 Compare February 14, 2025 10:59

func createTestBody() (v20241221.CreateTestRequestBody, error) {
resultType := v20241221.CodeSecurity
body := v20241221.CreateTestRequestBody{
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Better use the existing helper to create a request rather than having this code bloating the test

func TestTestClientPact(t *testing.T) {
setupPact(t)

t.Run("Create test", func(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: These types of tests are highly beneficial for testing edge cases. Currently this only contains the happy path which is also already tested through User Journey tests.

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

Successfully merging this pull request may close these issues.

2 participants