Closed Nkmol closed 2 years ago
Hi @Nkmol looks great, can you run accpetance tests and share results?
output from tests (from branch):
--- PASS: TestAccBitbucketPipelineSshKnownHost_basic (12.63s)
@DrFaust92 Thanks for this! Note that the current acceptance tests do not test much, as the Atlassian API simply accepts any input as long as it is a string 🤷
If I add a new type in the tests called "rsa-blablabla" and run the acceptance tests:
BITBUCKET_USERNAME=${username} BITBUCKET_PASSWORD=${app_password} BITBUCKET_TEAM=${workspace} TF_ACC=1 go test github.com/terraform-providers/terraform-provider-bitbucket/bitbucket -v -run '^TestAccBitbucketPipelineSshKnownHost_basic'
I still get a “OK” 😅
Speaking of this, I come across the last problem that is the last bit to make this resource completely useful: https://github.com/DrFaust92/terraform-provider-bitbucket/issues/76
This PR fixes the input validation for the
public_key.key_type
to work with values Bitbucket actually use for their known host entities.The values have been retrieved by using the
/pipelines_config/ssh/known_hosts/?pagelen=100
endpoint. Where the added known host is tested with an correct SSH pipeline connection.Fixes #70