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(iota-graphql-e2e-tests): restore graphql e2e tests #1969

Merged
merged 20 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d6332a4
refactor(iota-graphql-e2e-test): update baseline for available_range …
kodemartin Aug 21, 2024
cde7061
fix(iota-transactional-test-runner): use no padding while encoding gr…
kodemartin Aug 21, 2024
4210ae0
refactor(iota-graphql-e2e-test): update baseline for call tests
kodemartin Aug 21, 2024
8feebc1
refactor(iota-graphql-e2e-test): update baseline for consistency tests
kodemartin Aug 21, 2024
cf49007
refactor(iota-graphql-e2e-test): update baseline for epoch tests
kodemartin Aug 21, 2024
8844b38
refactor(iota-graphql-e2e-test): update baseline for event_connection…
kodemartin Aug 21, 2024
437fba5
refactor(iota-graphql-e2e-test): update baseline for limits tests
kodemartin Aug 21, 2024
0867350
refactor(iota-graphql-e2e-test): update baseline for objects tests
kodemartin Aug 21, 2024
ae7e976
refactor(iota-graphql-e2e-test): update baseline for owners tests
kodemartin Aug 21, 2024
a89c4f4
refactor(iota-graphql-e2e-test): update baseline for packages tests
kodemartin Aug 21, 2024
3dd54db
refactor(iota-graphql-e2e-test): update baseline for transaction_bloc…
kodemartin Aug 21, 2024
8a42887
refactor(iota-graphql-e2e-test): update baseline for transactions tests
kodemartin Aug 21, 2024
987ad09
refactor(docker): allow overriding postgres env variables
kodemartin Aug 21, 2024
a37ce5a
refactor(iota-graphql-e2e-tests): update README
kodemartin Aug 21, 2024
1a6a790
fixup! refactor(iota-graphql-e2e-tests): update README
kodemartin Aug 21, 2024
5360271
fixup! refactor(docker): allow overriding postgres env variables
kodemartin Aug 21, 2024
2734eaf
Merge branch 'develop' into sc-platform/restore-graphql-e2e-tests
kodemartin Aug 23, 2024
e4cac8b
fix(iota-graphql-e2e-test): fixed `objects/pagination.move` test
valeriyr Aug 26, 2024
70094fe
Merge branch 'develop' into sc-platform/restore-graphql-e2e-tests
lzpap Aug 27, 2024
a9f3499
fix(graphql-e2e-test): remove obsolete name service tests
lzpap Aug 27, 2024
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
1 change: 1 addition & 0 deletions Cargo.lock

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

40 changes: 11 additions & 29 deletions crates/iota-graphql-e2e-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,25 @@ runner.
# Local Set-up

These tests require a running instance of the `postgres` service, with a
database set-up. The instructions below assume that `postgres` has been
installed using `brew`:
database set-up.

1. See the instructions in the Iota Indexer [README](../iota-indexer/README.md)
for pre-requisites and starting the Postgres service.
It is recommended that the database server is started in a docker container.

2. When postgres is initially installed, it creates a role for your current
user. We need to use that role to create the role that will access the
database:
## Using `docker compose`

```sh
$ ME=$(whoami)
$ psql "postgres://$ME:$ME@localhost:5432/postgres" \
-c "CREATE ROLE postgres WITH SUPERUSER LOGIN PASSWORD 'postgrespw';"
$ POSTGRES_USER=postgres POSTGRES_DB=postgres POSTGRES_PASSWORD=postgrespw POSTGRES_INITDB_ARGS="-U postgres" docker compose -f docker/pg-services-local/docker-compose.yaml up -d postgres
```

3. Then, create the database that the tests expect, using the `postgres` user
and increase the max connections since many tests might run in parallel.
## Using `docker`

```sh
$ psql "postgres://postgres:postgrespw@localhost:5432/postgres" \
-c "CREATE DATABASE iota_indexer_v2;" -c "ALTER SYSTEM SET max_connections = 500;"
```

4. Finally, restart the `postgres` server so the max connections change takes
effect.

Mac

```sh
brew services restart postgresql@15
```

Linux

```sh
/etc/init.d/postgresql restart
docker run -d --name postgres \
-e POSTGRES_PASSWORD=postgrespw \
-e POSTGRES_INITDB_ARGS="-U postgres" \
-p 5432:5432 \
postgres:15 \
-c max_connections=1000
```

# Running Locally
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ Response: {
"data": {
"availableRange": {
"first": {
"digest": "5YXraQV5WesywS2GaHPgeTiFrq1jzZ4grxdGKwi9gVM2",
"digest": "GScMjNWDfxk3zKFB83PrCC2nh2UWWpRpGD2iF8qxsSWC",
"sequenceNumber": 0
},
"last": {
"digest": "5YXraQV5WesywS2GaHPgeTiFrq1jzZ4grxdGKwi9gVM2",
"digest": "GScMjNWDfxk3zKFB83PrCC2nh2UWWpRpGD2iF8qxsSWC",
"sequenceNumber": 0
}
},
"first": {
"digest": "5YXraQV5WesywS2GaHPgeTiFrq1jzZ4grxdGKwi9gVM2",
"digest": "GScMjNWDfxk3zKFB83PrCC2nh2UWWpRpGD2iF8qxsSWC",
"sequenceNumber": 0
},
"last": {
"digest": "5YXraQV5WesywS2GaHPgeTiFrq1jzZ4grxdGKwi9gVM2",
"digest": "GScMjNWDfxk3zKFB83PrCC2nh2UWWpRpGD2iF8qxsSWC",
"sequenceNumber": 0
}
}
Expand All @@ -35,20 +35,20 @@ Response: {
"data": {
"availableRange": {
"first": {
"digest": "5YXraQV5WesywS2GaHPgeTiFrq1jzZ4grxdGKwi9gVM2",
"digest": "GScMjNWDfxk3zKFB83PrCC2nh2UWWpRpGD2iF8qxsSWC",
"sequenceNumber": 0
},
"last": {
"digest": "2uu5ba8PLyPjJUwwBdzt4Zm2yjNyrWwULEPQTq32Fzt2",
"digest": "6jrWPojSy4Qn6z3SpC39MPUygjRre6eoQGu3XmfuxwxH",
"sequenceNumber": 2
}
},
"first": {
"digest": "5YXraQV5WesywS2GaHPgeTiFrq1jzZ4grxdGKwi9gVM2",
"digest": "GScMjNWDfxk3zKFB83PrCC2nh2UWWpRpGD2iF8qxsSWC",
"sequenceNumber": 0
},
"last": {
"digest": "2uu5ba8PLyPjJUwwBdzt4Zm2yjNyrWwULEPQTq32Fzt2",
"digest": "6jrWPojSy4Qn6z3SpC39MPUygjRre6eoQGu3XmfuxwxH",
"sequenceNumber": 2
}
}
Expand Down
60 changes: 30 additions & 30 deletions crates/iota-graphql-e2e-tests/tests/call/dynamic_fields.exp
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,26 @@ Response: {
{
"name": {
"type": {
"repr": "u64"
"repr": "bool"
},
"data": {
"Number": "0"
"Bool": false
},
"bcs": "AAAAAAAAAAA="
"bcs": "AA=="
},
"value": {
"__typename": "MoveObject"
"__typename": "MoveValue"
}
},
{
"name": {
"type": {
"repr": "bool"
"repr": "u64"
},
"data": {
"Bool": false
"Number": "0"
},
"bcs": "AA=="
"bcs": "AAAAAAAAAAA="
},
"value": {
"__typename": "MoveValue"
Expand Down Expand Up @@ -85,7 +85,7 @@ Response: {
"bcs": "AAAAAAAAAAA="
},
"value": {
"__typename": "MoveValue"
"__typename": "MoveObject"
}
}
]
Expand All @@ -112,26 +112,26 @@ Response: {
{
"name": {
"type": {
"repr": "u64"
"repr": "bool"
},
"data": {
"Number": "0"
"Bool": false
},
"bcs": "AAAAAAAAAAA="
"bcs": "AA=="
},
"value": {
"__typename": "MoveObject"
"__typename": "MoveValue"
}
},
{
"name": {
"type": {
"repr": "bool"
"repr": "u64"
},
"data": {
"Bool": false
"Number": "0"
},
"bcs": "AA=="
"bcs": "AAAAAAAAAAA="
},
"value": {
"__typename": "MoveValue"
Expand Down Expand Up @@ -162,7 +162,7 @@ Response: {
"bcs": "AAAAAAAAAAA="
},
"value": {
"__typename": "MoveValue"
"__typename": "MoveObject"
}
}
]
Expand All @@ -180,31 +180,35 @@ Response: {
{
"name": {
"type": {
"repr": "u64"
"repr": "bool"
},
"data": {
"Number": "0"
"Bool": false
},
"bcs": "AAAAAAAAAAA="
"bcs": "AA=="
},
"value": {
"__typename": "MoveObject"
"bcs": "AgAAAAAAAAA=",
"data": {
"Number": "2"
},
"__typename": "MoveValue"
}
},
{
"name": {
"type": {
"repr": "bool"
"repr": "u64"
},
"data": {
"Bool": false
"Number": "0"
},
"bcs": "AA=="
"bcs": "AAAAAAAAAAA="
},
"value": {
"bcs": "AgAAAAAAAAA=",
"bcs": "AAAAAAAAAAA=",
"data": {
"Number": "2"
"Number": "0"
},
"__typename": "MoveValue"
}
Expand Down Expand Up @@ -238,11 +242,7 @@ Response: {
"bcs": "AAAAAAAAAAA="
},
"value": {
"bcs": "AAAAAAAAAAA=",
"data": {
"Number": "0"
},
"__typename": "MoveValue"
"__typename": "MoveObject"
}
}
]
Expand Down
Loading
Loading