Skip to content

HC_TEST_TERRAFORM helper, console titles, localhost in Testcontainers, signed installs in the action - #130

Merged
drk1rd merged 4 commits into
mainfrom
small-fixes-2
Oct 14, 2026
Merged

drk1rd merged 4 commits into
mainfrom
small-fixes-2

Conversation

@drk1rd

@drk1rd drk1rd commented Oct 14, 2026

Copy link
Copy Markdown
Member

Closes #97, closes #98

Terraform tests: one meaning for HC_TEST_TERRAFORM (#97). New awstest.Terraform(t) skips unless HC_TEST_TERRAFORM is set (and in -short mode), uses the value as the binary when it names an executable file, and otherwise looks up terraform, then tofu, on PATH, skipping with a message when neither is there. The IAM, S3, CloudFormation and Route 53 Terraform tests all use it, so HC_TEST_TERRAFORM=1 no longer makes the IAM test run a program called 1, and the IAM test no longer runs (and downloads the provider) without the variable. Documented in the awstest package comment and the CONTRIBUTING.md table.

Console: description and tab titles (#98). The site description no longer lists seven services ("The web console for HomeCloud, a self-hosted AWS-compatible cloud."). The home page sets the title "Home"; the sign-in page, a client component, gets it ("Sign in") from a new app/login/layout.tsx. The export renders Home | HomeCloud Console and Sign in | HomeCloud Console.

Testcontainers: the endpoint is http://localhost:<port> in all four modules. All four (Go, Python, Java, Node) mapped a localhost Docker host to 127.0.0.1, to keep SDKs from trying IPv6 first or using bucket.localhost names. Since #125, homecloud aws-env, the GitHub Action and the docs name a local server localhost because S3 Control (which the Terraform AWS provider 6.x calls for every aws_s3_bucket, and s3control clients use) puts the account ID in front of the endpoint's host: 123456789012.127.0.0.1 does not resolve, 123456789012.localhost does. The two old concerns do not hold: HomeCloud listens on 127.0.0.1 and every SDK's HTTP stack falls back to it when ::1 refuses (Go's dialer, urllib3, Java's IPv4-first resolution plus the SDK clients' retry of the next address, Node.js 20+ autoSelectFamily); and the modules' S3 helpers already force path-style addressing, so bucket names never need to resolve. So the modules now name a loopback Docker host (localhost, 127.0.0.1, ::1) localhost, matching aws-env; other hosts are kept. Each module's integration test now also calls S3 Control ListTagsForResource (which fails with a 127.0.0.1 endpoint), and Python, Java and Node get a unit test of the mapping. READMEs and docs/integrations.md say why.

GitHub Action mirror: verify the release signature. Same change as solinode/setup-homecloud#2, in integrations/github-action: when a release publishes checksums.txt.sigstore.json (v0.5.0 on), the action verifies it with cosign against the release workflow's identity at the tag before trusting checksums.txt; older releases keep the checksum-only check; new input verify-signature (default true).

Tests:

  • go test ./internal/svc/iam/ ./internal/svc/s3/ ./internal/svc/cfn/ ./internal/svc/route53/ -run Terraform: all four skip without the variable; with HC_TEST_TERRAFORM=1 (tofu on PATH) all four pass; HC_TEST_TERRAFORM=/opt/homebrew/bin/tofu runs the IAM test with that binary; a non-executable value with no terraform/tofu on PATH skips with a message.
  • cd console && npx tsc --noEmit && npm run build && npm run build:demo: pass; titles checked in out/index.html and out/login/index.html.
  • Testcontainers, against an image built from integrations/testdata/Dockerfile on OrbStack: go test ./... (2 pass), pytest (9 pass), npx vitest run (8 pass), mvn test (8 pass). With the Go module switched back to 127.0.0.1, the new S3 Control check fails with lookup 274530734788.127.0.0.1: no such host.
  • bash integrations/github-action/test/inputs.sh: pass. The install path was run locally for v0.5.0 (signature verified), v0.4.1 (checksum only) and verify-signature=false.

Add awstest.Terraform, which skips unless HC_TEST_TERRAFORM is set (and in
-short mode), uses the value as the binary when it is an executable, and
otherwise looks up terraform, then tofu, on PATH. The IAM, S3, CloudFormation
and Route 53 Terraform tests all use it, so HC_TEST_TERRAFORM=1 no longer makes
the IAM test run a program called 1, and the IAM test no longer runs unasked.

Closes #97
Same change as solinode/setup-homecloud#2: when a release publishes
checksums.txt.sigstore.json (v0.5.0 on), verify it with cosign against the
release workflow's identity before trusting checksums.txt; releases before
v0.5.0 keep the checksum-only check. New input verify-signature (default true).
The Go, Python, Java and Node modules turned a localhost Docker host into
127.0.0.1. Like homecloud aws-env since #125, name a loopback host localhost
instead: S3 Control (which the Terraform AWS provider calls for every
aws_s3_bucket) puts the account ID in front of the endpoint's host, and
123456789012.127.0.0.1 does not resolve. HomeCloud listens on 127.0.0.1 and
clients that try ::1 first fall back to it; the modules' S3 helpers already use
path-style addressing, so bucket names never need to resolve.

Each module's integration test now calls S3 Control ListTagsForResource, and
Python, Java and Node unit-test the host mapping. READMEs and
docs/integrations.md explain the choice.
@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 34 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 68fca1bd-86c8-42f1-8e0f-d6bc7c5618ac
📥 Commits

Reviewing files that changed from the base of the PR and between 16e0b5f and 6a042c2.

⛔ Files ignored due to path filters: 2
  • integrations/testcontainers-go/go.sum is excluded by !**/*.sum
  • integrations/testcontainers-node/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing: 32
  • CONTRIBUTING.md
  • cli/internal/awsapi/awstest/awstest.go
  • cli/internal/svc/cfn/terraform_test.go
  • cli/internal/svc/iam/terraform_test.go
  • cli/internal/svc/route53/terraform_test.go
  • cli/internal/svc/s3/terraform_test.go
  • console/app/(console)/page.tsx
  • console/app/layout.tsx
  • console/app/login/layout.tsx
  • docs/integrations.md
  • integrations/github-action/README.md
  • integrations/github-action/action.yml
  • integrations/github-action/main.js
  • integrations/github-action/setup.sh
  • integrations/github-action/test/inputs.sh
  • integrations/testcontainers-go/README.md
  • integrations/testcontainers-go/go.mod
  • integrations/testcontainers-go/homecloud.go
  • integrations/testcontainers-go/homecloud_test.go
  • integrations/testcontainers-java/README.md
  • integrations/testcontainers-java/pom.xml
  • integrations/testcontainers-java/src/main/java/io/github/solinode/homecloud/testcontainers/HomeCloudContainer.java
  • integrations/testcontainers-java/src/test/java/io/github/solinode/homecloud/testcontainers/HomeCloudContainerTest.java
  • integrations/testcontainers-java/src/test/java/io/github/solinode/homecloud/testcontainers/ParseAwsEnvTest.java
  • integrations/testcontainers-node/README.md
  • integrations/testcontainers-node/package.json
  • integrations/testcontainers-node/src/index.ts
  • integrations/testcontainers-node/test/homecloud.test.ts
  • integrations/testcontainers-python/README.md
  • integrations/testcontainers-python/src/testcontainers_homecloud/__init__.py
  • integrations/testcontainers-python/tests/test_homecloud.py
  • integrations/testcontainers-python/tests/test_options.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying homecloud with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6a042c2
Status: ✅  Deploy successful!
Preview URL: https://a7fd43d5.homecloud.pages.dev
Branch Preview URL: https://small-fixes-2.homecloud.pages.dev

View logs

@drk1rd
drk1rd merged commit ae1f732 into main Oct 14, 2026
10 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

1 participant