Skip to content

Conversation

@aphralG
Copy link
Contributor

@aphralG aphralG commented Feb 15, 2023

Proposed changes

  • Updated API component tests to use resty

  • Fixed API Integration Test

    • TestAPI_Nginx was only checking the first 2 switch cases and passing because the response was not being split correctly in the test, made changes so all tests need to pass.
  • Moved ProcessResponse from API tests to tutils

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • I have updated any relevant documentation (README.md)

@aphralG aphralG self-assigned this Feb 15, 2023
@netlify
Copy link

netlify bot commented Feb 15, 2023

Deploy Preview for agent-public-docs canceled.

Name Link
🔨 Latest commit b3ee77a
🔍 Latest deploy log https://app.netlify.com/sites/agent-public-docs/deploys/63f4a0bfc2cac0000809cfd8

@github-actions github-actions bot added bug Something isn't working chore Pull requests for routine tasks dependencies documentation Improvements or additions to documentation labels Feb 15, 2023
@aphralG aphralG marked this pull request as ready for review February 15, 2023 16:35
mockEnvironment := tutils.NewMockEnvironment()
mockNginxBinary := tutils.NewMockNginxBinary()

agentAPI := plugins.NewAgentAPI(conf, mockEnvironment, mockNginxBinary)
Copy link
Contributor

Choose a reason for hiding this comment

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

Optional:
I don't think asserting that /invalid/ 404s is valuable. I think func TestInvalidPath can be removed.

@dhurley dhurley removed bug Something isn't working documentation Improvements or additions to documentation dependencies labels Feb 17, 2023
@github-actions github-actions bot added bug Something isn't working dependencies documentation Improvements or additions to documentation labels Feb 21, 2023
@aphralG aphralG merged commit 03163a6 into main Feb 21, 2023
@oliveromahony oliveromahony deleted the fix-api-component-test branch February 21, 2023 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working chore Pull requests for routine tasks dependencies documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants