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

Fix Acceptance Tests on Windows #186

Open
1 task done
SBGoods opened this issue Feb 27, 2023 · 0 comments
Open
1 task done

Fix Acceptance Tests on Windows #186

SBGoods opened this issue Feb 27, 2023 · 0 comments

Comments

@SBGoods
Copy link
Contributor

SBGoods commented Feb 27, 2023

Terraform CLI and Provider Versions

N/A

Use Cases or Problem Statement

The acceptance tests for the External provider currently work by building a test program in a set directory relative to the system's GOPATH and validating the outputs of the program against the Terraform configuration. These tests currently fail on Windows operating systems due to the nature of filepaths on Windows compared to UNIX-based systems. This results in errors such as the following:

 data_source_test.go:48: Step 1/1 error: Error running pre-apply refresh: exit status 1
        
        Error: Invalid escape sequence
        
          on terraform_plugin_test.tf line 3, in data "external" "test":
          3:   program = ["C:\Users\runneradmin\go/bin/tf-acc-external-data-source", "cheese"]
        
        The \U escape sequence must be followed by eight hexadecimal digits.

Proposal

We would need to rewrite the buildDataSourceTestProgram() function in data_source_test.go, which builds the file path for the test program, to correctly handle building file paths for Windows systems.

How much impact is this issue causing?

Low

Additional Information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant