Skip to content

Migrate tests to Terraform for jetbrains, zed, and code-server #307

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

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

Conversation

matifali
Copy link
Member

@matifali matifali commented Aug 8, 2025

Summary

  • Introduces Terraform native tests (terraform test) alongside existing Bun tests
  • Migrates tests for modules: jetbrains, zed, and code-server
  • Removes Bun test files for these migrated modules only
  • Adds repo-wide test runner script for Terraform tests
  • Updates docs and new-module sample to reflect Terraform tests

Transition plan

  • Mixed mode: Other modules retain Bun tests; CI should run both Bun and Terraform tests temporarily
  • Follow the linked epic to migrate remaining modules

Test plan

  • Run: ./scripts/terraform_test_all.sh (passes locally)
  • Bun tests still available for non-migrated modules

Affected paths

  • registry/coder/modules/jetbrains/jetbrains.tftest.hcl
  • registry/coder/modules/zed/zed.tftest.hcl
  • registry/coder/modules/code-server/code-server.tftest.hcl
  • scripts/terraform_test_all.sh
  • examples/modules/MODULE_NAME.tftest.hcl
  • CONTRIBUTING.md

Contributes to #308

@matifali matifali changed the title Migrate tests to Terraform for jetbrains, zed, and code-server; enable mixed test mode Migrate tests to Terraform for jetbrains, zed, and code-server Aug 8, 2025
@matifali matifali self-assigned this Aug 8, 2025
…o terraform runner; no direct pushes to main
…CP settings, model/force)

- Runs `cursor-agent` directly (no AgentAPI); interactive chat by default
- Supports non-interactive prints (-p) with output-format, model (-m), force (-f)
- Merges MCP settings into ~/.cursor/settings.json
- Installs via npm (uses nvm if needed); terraform tests added
Copy link
Contributor

@DevelopmentCats DevelopmentCats left a comment

Choose a reason for hiding this comment

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

I think the tests are failing because its running the tests as the root user, and then expecting the log to be found in /home/coder @matifali

@matifali matifali marked this pull request as draft August 8, 2025 19:09
…fault, MCP settings, model/force)"

This reverts commit 8ea853c.
@matifali
Copy link
Member Author

matifali commented Aug 8, 2025

@DevelopmentCats can you review again? I commited some wrong files from another branch.

@matifali matifali marked this pull request as ready for review August 8, 2025 19:20
@DevelopmentCats
Copy link
Contributor

@DevelopmentCats can you review again? I commited some wrong files from another branch.

I figured that might have been the case but I didn't want to assume since you were making specific changes to multiple modules.

@matifali
Copy link
Member Author

matifali commented Aug 8, 2025

@DevelopmentCats, I haven't deleted the existing bun tests yet. Want to ensure full coverage in the Terraform tests before we remove them.

Copy link
Contributor

@DevelopmentCats DevelopmentCats left a comment

Choose a reason for hiding this comment

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

LGTM

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