Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: too long db names in tests #1073

Merged
merged 3 commits into from
Sep 27, 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
2 changes: 1 addition & 1 deletion .github/workflows/bens.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
image: postgres:16
env:
POSTGRES_PASSWORD: admin
POSTGRES_USER: graph-node
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/da-indexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
image: postgres:16
env:
POSTGRES_PASSWORD: admin
POSTGRES_USER: postgres
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/eth-bytecode-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
image: postgres:16
env:
POSTGRES_PASSWORD: admin
POSTGRES_USER: postgres
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/user-ops-indexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
image: postgres:16
env:
POSTGRES_PASSWORD: admin
POSTGRES_USER: postgres
Expand Down
2 changes: 1 addition & 1 deletion blockscout-ens/bens-logic/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub async fn mocked_blockscout_client() -> BlockscoutClient {
let mock_server = MockServer::start().await;
for (tx_hash, tx) in TXNS.iter() {
let mock =
Mock::given(method("GET")).and(path(&format!("/api/v2/transactions/{tx_hash:#x}")));
Mock::given(method("GET")).and(path(format!("/api/v2/transactions/{tx_hash:#x}")));
mock.respond_with(ResponseTemplate::new(200).set_body_json(tx))
.mount(&mock_server)
.await;
Expand Down
8 changes: 4 additions & 4 deletions eth-bytecode-db/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion libs/blockscout-service-launcher/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "blockscout-service-launcher"
version = "0.13.1"
version = "0.13.2"
description = "Allows to launch blazingly fast blockscout rust services"
license = "MIT"
repository = "https://github.com/blockscout/blockscout-rs"
Expand Down
3 changes: 2 additions & 1 deletion libs/blockscout-service-launcher/src/test_database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ impl TestDbGuard {
.await
.expect("Connection to postgres (without database) failed");
// We use a hash, as the name itself may be quite long and be trimmed.
let db_name = format!("_{:x}", keccak_hash::keccak(db_name));
// Postgres DB name should be 63 symbols max.
let db_name = format!("_{:x}", keccak_hash::keccak(db_name))[..63].to_string();
let mut guard = TestDbGuard {
conn_with_db: Arc::new(DatabaseConnection::Disconnected),
conn_without_db: Arc::new(conn_without_db),
Expand Down
2 changes: 1 addition & 1 deletion service-template/.github/workflows/{{project-name}}.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
{%- if database %}
services:
postgres:
image: postgres
image: postgres:16
env:
POSTGRES_PASSWORD: admin
POSTGRES_USER: postgres
Expand Down
Loading