# api: skip retired-env gate test when the var is present-but-empty

`51ebf09`→[main](/content/gh/entireio/cli/commits/main/index.html)·

toothbrush·1mo ago·1 file·+3 added/-1 removed

The unset-passes subtest guarded with Getenv != "" while the gate rejects a present-but-empty ENTIRE_AUTH_BASE_URL too, so an empty export in the parent shell ran the subtest and failed it. LookupEnv matches what the gate checks.

Deliberately NOT scrubbing the var in the integration/e2e TestMains: a shell that still exports it fails every entire invocation loudly by design, and the test harness shouldn't mask that.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

## Sessions

3f558d114e08View transcript

## Changes

1

- cmd/entire/cli/api

- Mbase_url_test.go+3/-1

```
158 unmodified lines

// empty — errors with the --server replacement hint; unset passes.
func TestRejectRemovedAuthEnv(t *testing.T) {
	t.Run("unset passes", func(t *testing.T) {
		if os.Getenv(AuthBaseURLEnvVar) != "" {
			// LookupEnv, not Getenv: the gate rejects a present-but-empty var
			// too, so an empty export in the parent shell must also skip.
			if _, ok := os.LookupEnv(AuthBaseURLEnvVar); ok {
				t.Skipf("%s set in test environment", AuthBaseURLEnvVar)
			}
			if err := RejectRemovedAuthEnv(); err != nil {
```

Mcmd/entire/cli/api/base_url_test.go+3/-1
