Skip to content

test: Fix macos unit test failures - #2429

Merged
Eitan Yarmush (EItanya) merged 3 commits into
agent-substrate:mainfrom
timflannagan:fix/macos-unit-tests
Oct 10, 2026
Merged

Eitan Yarmush (EItanya) merged 3 commits into
agent-substrate:mainfrom
timflannagan:fix/macos-unit-tests

Conversation

@timflannagan

Copy link
Copy Markdown
Contributor

Description

make test failed on macOS for two host-specific reasons. The DNS relay
referenced Linux-only network namespace APIs from an otherwise portable file,
and the object storage tests inherited exported AWS_PROFILE and
AWS_DEFAULT_PROFILE values from the developer's shell.

Move only the namespace-serving method behind a Linux build tag so portable
DNS tests still run on macOS. Clear both AWS profile selectors in the object
storage test so local AWS configuration cannot affect it.

  • Tests pass
  • Appropriate changes to documentation are included in the PR

Keep the portable DNS relay implementation available to unit tests on every
supported development platform.

Previously, relay.go referenced Linux-only network namespace APIs, so the DNS
package did not compile when make test ran on macOS.

Now the namespace-serving method lives in a Linux-tagged file while relay
construction and socket-level tests remain portable.

Signed-off-by: timflannagan <timflannagan@gmail.com>
Prevent developer AWS profile settings from changing object storage unit test
behavior.

Previously, TestNewFromEnv redirected AWS config files but still inherited
AWS_PROFILE and AWS_DEFAULT_PROFILE. An exported profile could make the AWS SDK
reject the intentionally missing test configuration.

Now the test clears both profile selectors before constructing the S3 client.

Signed-off-by: timflannagan <timflannagan@gmail.com>
@timflannagan Tim Flannagan (timflannagan) changed the title test: Fix macOS unit test failures test: Fix macos unit test failures Oct 9, 2026
Correct the Apache license URL so the boilerplate verifier recognizes the
header in the Linux DNS relay.

Previously, the header used the HTTPS form while the verifier requires the
repository's exact HTTP boilerplate and reported the header as missing.

Now the relay uses the standard boilerplate and passes license verification.

Signed-off-by: timflannagan <timflannagan@gmail.com>
)

// Serve serves UDP and TCP DNS in the sandbox's local gateway namespace.
func (r *Relay) Serve(ctx context.Context, ns netns.Handle) (*Server, error) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we have an explicit panic or return err function in //go:build !linux

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not sure I follow - this is existing code. If we're talking about error handling, I think the current code is correct vs. panicing

@EItanya
Eitan Yarmush (EItanya) added this pull request to the merge queue Oct 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 10, 2026
@EItanya
Eitan Yarmush (EItanya) added this pull request to the merge queue Oct 10, 2026
Merged via the queue into agent-substrate:main with commit 5f9059d Oct 10, 2026
14 checks passed
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.

3 participants