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

Use simplified relationships for all services & vendors #224

Merged
merged 6 commits into from
Jun 14, 2024

Conversation

chadwcarlson
Copy link
Contributor

@chadwcarlson chadwcarlson commented Jun 13, 2024

Closes #222

Updating Upsun and Platform.sh was a bit complicated for the tests and expected types.

Currently:

  • Upsun uses explicit relationships, but of incorrect format. (see issue linked above for details)
  • Platform.sh uses legacy relationships

This PR (for now) updates both Platform.sh and Upsun platformify commands (when a service is chosen) to use the simplified relationships format.

@chadwcarlson
Copy link
Contributor Author

Stuck modifying tests for empty string and expected type in answer_test.go

=== RUN   TestPlatformifier_Platformify/Django
    platformifier_test.go:509: Platformifier.Platformify() validation error = validation failed for .platform.app.yaml: relationships.db: Invalid type. Expected: string, given: null
        relationships.mysql: Invalid type. Expected: string, given: null, wantErr false
=== RUN   TestPlatformifier_Platformify/Generic
    platformifier_test.go:509: Platformifier.Platformify() validation error = validation failed for .platform.app.yaml: relationships.mysql: Invalid type. Expected: string, given: null, wantErr false
=== RUN   TestPlatformifier_Platformify/Laravel
=== RUN   TestPlatformifier_Platformify/Next.js
=== RUN   TestPlatformifier_Platformify/Strapi
=== RUN   TestPlatformifier_Platformify/Flask
=== RUN   TestPlatformifier_Platformify/Express
--- FAIL: TestPlatformifier_Platformify (0.05s)
    --- FAIL: TestPlatformifier_Platformify/Django (0.01s)
    --- FAIL: TestPlatformifier_Platformify/Generic (0.01s)
    --- PASS: TestPlatformifier_Platformify/Laravel (0.01s)
    --- PASS: TestPlatformifier_Platformify/Next.js (0.01s)
    --- PASS: TestPlatformifier_Platformify/Strapi (0.01s)
    --- PASS: TestPlatformifier_Platformify/Flask (0.01s)
    --- PASS: TestPlatformifier_Platformify/Express (0.01s)

Copy link
Member

@akalipetis akalipetis left a comment

Choose a reason for hiding this comment

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

LGTM!

@chadwcarlson I fixed the failing tests and restructured the code a bit, to handle the new logic.

Let me know if you're OK with the updates and I'll be happy to merge 🎉

@akalipetis akalipetis merged commit d84ff2c into main Jun 14, 2024
3 checks passed
@akalipetis akalipetis deleted the simplified-rels branch June 14, 2024 13:09
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.

Endpoint definition is broken when relationships are included (new syntax)
2 participants