Documentation
¶
Overview ¶
Package testguard keeps a test binary away from the App Store Connect credentials of the developer who runs it.
A developer who has signed in with asc has a real API key, Apple Ads key and web session on the machine: in ~/.asc, in a repo-local .asc above the checkout, in the keychain, and in ASC_* variables of their shell. A test that did not isolate one of these ran with that account, and a command test that expected to stop at "no authentication" sent real requests to Apple instead. In a test binary this package hides all of them, so every test sees the machine as CI does. It does nothing in any other binary, nor in the opt-in integration build, whose tests use the developer's credentials on purpose.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HideForTest ¶
func HideForTest(dirs ...string) (restore func())
HideForTest also hides dirs, as if they belonged to the developer, until restore is called.
Types ¶
This section is empty.