Documentation
¶
Index ¶
Constants ¶
const ( AuthEnvVar = "CENSYS_API_TOKEN" OrgIDEnvVar = "CENSYS_ORG_ID" )
Variables ¶
This section is empty.
Functions ¶
func ConfigureAuth ¶
ConfigureAuth sets up authentication credentials for e2e tests by running config commands. It requires CENSYS_API_TOKEN and CENSYS_ORG_ID environment variables to be set. It also requires the binary path to be passed in.
func E2EEnvVars ¶
E2EEnvVars returns the environment variables that are used for all e2e tests. It configures a custom data directory and disables color/spinner output for deterministic testing. If the data dir is empty, which will be the case for the smoke test, then that environment variable is not set.
func FindBinary ¶
func FindBinary() string
FindBinary searches for the censys binary in common relative paths from the test directory. It returns the absolute path if found, or an empty string if not found.
Types ¶
type CommandResult ¶
CommandResult captures the output and exit status of a command execution.
func RunCommand ¶
func RunCommand(cmd *exec.Cmd) CommandResult
RunCommand executes a command and captures its stdout, stderr, exit code, and any errors.