Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error "exec: 'gotestsum': executable file not found in $PATH" #52

Open
naustin opened this issue Mar 15, 2022 · 3 comments
Open

Comments

@naustin
Copy link

naustin commented Mar 15, 2022

I'm experimenting with unit tests in my terraform step, but when I execute Runiac it reports that a test has been found but after the step runs and it tries to execute the test I'm getting the error "exec: 'gotestsum': executable file not found in $PATH".

Here's the log before the error:

Running command: gotestsum --format standard-verbose --junitfile /output/junit/azure-hello-world-default-namespace-primary-centralus.xml --raw-command -- test2json -p azure-hello-world-default-namespace-primary-centralus ./tests.test -test.v.
EnvVars: [TF_VAR_runiac_step, TF_VAR_runiac_region_group, TF_VAR_runiac_target_account_id, TF_VAR_runiac_project, TF_VAR_runiac_region_deploy_type, TF_VAR_runiac_account_id, TF_VAR_runiac_region, TF_VAR_runiac_track, TF_VAR_runiac_primary_region, TF_VAR_runiac_namespace, TF_VAR_runiac_deployment_ring, TF_VAR_runiac_app_version, TF_VAR_runiac_environment]
@naustin
Copy link
Author

naustin commented Mar 15, 2022

Here's the configuration from the logs:

Parsed configuration: {
    "RegionalRegions": null,
    "PrimaryRegion": "centralus",
    "DryRun": false,
    "Runner": "terraform",
    "UniqueExternalExecutionID": "",
    "DeploymentRing": "local",
    "SelfDestroy": false,
    "RegionGroup": "",
    "StepWhitelist": null,
    "TargetAll": true,
    "Version": "",
    "MaxRetries": 3,
    "MaxTestRetries": 2,
    "LogLevel": "info",
    "CoreAccounts": null,
    "RegionGroups": null,
    "Namespace": "naustin",
    "Environment": "",
    "Project": "azure-hello-world"
}
Initializing runiac Terraform plugin
Running command: terraform version -no-color
Binary: Terraform v0.15.1
on linux_amd64

@tiny-dancer
Copy link
Contributor

@naustin well done! living on the edge leveraging largely undocumented features, we weren't sure if this feature would be valuable in oss so did not bring it in as a first class item but also did not remove it entirely.

How are your tests configured/written? The way runiac is configured for this feature is it will execute a tests.test executable in the tests directory and assumes golang was used as the test framework (herego using gotestsum for junit compatibility).

RE: the error specifically, if you add gotestsum to your runiac docker container - it should move forward from this error.

@tiny-dancer
Copy link
Contributor

@naustin will close in a few days if no further issues

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

No branches or pull requests

2 participants