Skip to content

Commit

Permalink
test: use dummy credential when executing tests (#268)
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroaki Goto <hiroag@amazon.com>
  • Loading branch information
StoneDot authored Nov 29, 2024
1 parent ffe77c1 commit 6e39f09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
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

0 comments on commit 6e39f09

Please # to comment.