Skip to content
New issue

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

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

Already on GitHub? # to your account

test: use dummy credential when executing tests #268

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ jobs:
RUST_LOG: debug # Output debug log
RUST_BACKTRACE: 1 # Dump backtrace on panic
DYNEIN_TEST_NO_DOCKER_SETUP: true
# define AWS credentials in environment for test
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
services:
dynamodb:
# Pinned to the version not to be broken with latest
Expand Down Expand Up @@ -54,9 +51,6 @@ jobs:
RUST_LOG: debug # Output debug log
RUST_BACKTRACE: 1 # Dump backtrace on panic
DYNEIN_TEST_NO_DOCKER_SETUP: true
# define AWS credentials in environment for test
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
steps:
- uses: actions/checkout@v4
- name: Install rust toolchain
Expand Down
6 changes: 5 additions & 1 deletion tests/util/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ impl<'a> TestManager<'a> {

pub fn command(&self) -> Result<Command, Box<dyn std::error::Error>> {
let mut c = Command::cargo_bin("dy")?;
c.env("DYNEIN_CONFIG_DIR", &self.default_config_dir);
c.envs([
("DYNEIN_CONFIG_DIR", &self.default_config_dir),
("AWS_ACCESS_KEY_ID", &PathBuf::from("test")),
("AWS_SECRET_ACCESS_KEY", &PathBuf::from("test")),
]);
Ok(c)
}

Expand Down