Skip to content

Commit

Permalink
test_runner: set AWS credentials for endpoints (#4887)
Browse files Browse the repository at this point in the history
## Problem

If AWS credentials are not set locally (via
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY env vars)
`test_remote_library[release-pg15-mock_s3]` test fails with the
following error:

```
ERROR could not start the compute node: Failed to download a remote file: Failed to download S3 object: failed to construct request
```

## Summary of changes
- set AWS credentials for endpoints programmatically
  • Loading branch information
bayandin authored Aug 3, 2023
1 parent 416c14b commit cd33089
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test_runner/fixtures/neon_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -1595,7 +1595,11 @@ def endpoint_start(
if endpoint_id is not None:
args.append(endpoint_id)

res = self.raw_cli(args)
s3_env_vars = None
if self.env.remote_storage is not None and isinstance(self.env.remote_storage, S3Storage):
s3_env_vars = self.env.remote_storage.access_env_vars()

res = self.raw_cli(args, extra_env_vars=s3_env_vars)
res.check_returncode()
return res

Expand Down
1 change: 1 addition & 0 deletions test_runner/regress/test_compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ def check_neon_works(
config.pg_version = pg_version
config.initial_tenant = snapshot_config["default_tenant_id"]
config.pg_distrib_dir = pg_distrib_dir
config.remote_storage = None

# Use the "target" binaries to launch the storage nodes
config_target = config
Expand Down

1 comment on commit cd33089

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1332 tests run: 1273 passed, 0 failed, 59 skipped (full report)


Please sign in to comment.