Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
datasource/tls_certificate: Use local TLS server and certificate for …
…verify failure testing (#517) Reference: #516 Previously (likely due to external SSL certificate rotation): ``` === RUN TestAccDataSourceCertificate_BadSSL data_source_certificate_test.go:166: Step 2/2 error: Check failed: Check 14/14 error: data.tls_certificate.test: Attribute 'certificates.1.sha1_fingerprint' expected "6922cd864f3c6299f6e751a019e5ddcdbc415a71", got "eede8b066561000952c3e599d4873eed75512a3b" --- FAIL: TestAccDataSourceCertificate_BadSSL (0.64s) ``` The goal of this test is to ensure the data source returns an error if there is an invalid SSL certificate chain, which can be accomplished by running a local TLS server with expired or otherwise invalid SSL certificate. There still is one external, real-world URL test with `TestAccDataSourceCertificate_TerraformIO`. It seems important to ensure there is one valid URL test for complete coverage though. If that test becomes a regular problem, a local TLS server could potentially be spun up with a valid SSL certificate via Let's Encrypt or something, however that effort is not being prioritized at the moment.
- Loading branch information