Skip to content

bug: os.Setenv instead of t.Setenv in toolkit tests — not parallel-safe #64

@jonchun

Description

@jonchun

Summary

TestDeployTools uses os.Setenv with manual cleanup instead of t.Setenv(). This is not safe with t.Parallel() and the manual cleanup incorrectly sets the env var to empty string (instead of unsetting) if it was previously unset.

Location

toolkit/toolkit_test.go:217,220

Suggested Fix

Replace with t.Setenv("SHELLGUARD_TOOLKIT_DIR", cacheDir) which handles cleanup automatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority: lowNice to fix - minor improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions