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

Add more tests with gel_and_edgedb warnings #47

Merged
merged 1 commit into from
Jan 16, 2025
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
109 changes: 108 additions & 1 deletion connection_testcases.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,56 @@
"waitUntilAvailable": "PT30S"
}
},
{
"env": {
"EDGEDB_PORT": "12345",
"GEL_HOST": "test.local"
},
"name": "basic_env_GEL_HOST is respected",
"result": {
"address": [
"test.local",
12345
],
"branch": "__default__",
"database": "edgedb",
"password": null,
"secretKey": null,
"serverSettings": {},
"tlsCAData": null,
"tlsSecurity": "strict",
"tlsServerName": null,
"user": "edgedb",
"waitUntilAvailable": "PT30S"
}
},
{
"env": {
"EDGEDB_HOST": "test.local1",
"GEL_HOST": "test.local",
"GEL_PORT": "12345"
},
"name": "basic_env_GEL_HOST is used instead of EDGEDB_HOST",
"result": {
"address": [
"test.local",
12345
],
"branch": "__default__",
"database": "edgedb",
"password": null,
"secretKey": null,
"serverSettings": {},
"tlsCAData": null,
"tlsSecurity": "strict",
"tlsServerName": null,
"user": "edgedb",
"waitUntilAvailable": "PT30S"
},
"warnings": [
"gel_and_edgedb"
]
},
{
"env": {
"GEL_PASSWORD": "secret",
Expand All @@ -69,6 +119,33 @@
"waitUntilAvailable": "PT30S"
}
},
{
"env": {
"EDGEDB_PASSWORD": "secret2",
"GEL_PASSWORD": "secret",
"GEL_PORT": "1234"
},
"name": "basic_env_GEL_PASSWORD is used instead of EDGEDB_PASSWORD",
"result": {
"address": [
"localhost",
1234
],
"branch": "__default__",
"database": "edgedb",
"password": "secret",
"secretKey": null,
"serverSettings": {},
"tlsCAData": null,
"tlsSecurity": "strict",
"tlsServerName": null,
"user": "edgedb",
"waitUntilAvailable": "PT30S"
},
"warnings": [
"gel_and_edgedb"
]
},
{
"env": {
"GEL_PORT": "1234",
Expand All @@ -92,6 +169,33 @@
"waitUntilAvailable": "PT30S"
}
},
{
"env": {
"EDGEDB_USER": "testuser2",
"GEL_PORT": "1234",
"GEL_USER": "testuser"
},
"name": "basic_env_GEL_USER is used instead of EDGEDB_USER",
"result": {
"address": [
"localhost",
1234
],
"branch": "__default__",
"database": "edgedb",
"password": null,
"secretKey": null,
"serverSettings": {},
"tlsCAData": null,
"tlsSecurity": "strict",
"tlsServerName": null,
"user": "testuser",
"waitUntilAvailable": "PT30S"
},
"warnings": [
"gel_and_edgedb"
]
},
{
"env": {
"EDGEDB_PORT": "1234"
Expand Down Expand Up @@ -3759,7 +3863,10 @@
"tlsServerName": null,
"user": "edgedb",
"waitUntilAvailable": "PT30S"
}
},
"warnings": [
"gel_and_edgedb"
]
},
{
"fs": {
Expand Down
66 changes: 66 additions & 0 deletions tests/basic/env.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,24 @@
"user": "testuser"
}
},
{
"name": "GEL_USER is used instead of EDGEDB_USER",
"env": {
"GEL_PORT": "1234",
"GEL_USER": "testuser",
"EDGEDB_USER": "testuser2"
},
"result": {
"address": [
"localhost",
1234
],
"user": "testuser"
},
"warnings": [
"gel_and_edgedb"
]
},
{
"name": "EDGEDB_PASSWORD is recognised",
"env": {
Expand Down Expand Up @@ -67,6 +85,24 @@
"password": "secret"
}
},
{
"name": "GEL_PASSWORD is used instead of EDGEDB_PASSWORD",
"env": {
"GEL_PORT": "1234",
"GEL_PASSWORD": "secret",
"EDGEDB_PASSWORD": "secret2"
},
"result": {
"address": [
"localhost",
1234
],
"password": "secret"
},
"warnings": [
"gel_and_edgedb"
]
},
{
"env": {
"EDGEDB_DSN": "edgedb://user3:123123@localhost:5555/abcdef",
Expand Down Expand Up @@ -120,6 +156,36 @@
]
}
},
{
"env": {
"GEL_HOST": "test.local",
"EDGEDB_PORT": "12345"
},
"name": "GEL_HOST is respected",
"result": {
"address": [
"test.local",
12345
]
}
},
{
"env": {
"GEL_HOST": "test.local",
"EDGEDB_HOST": "test.local1",
"GEL_PORT": "12345"
},
"name": "GEL_HOST is used instead of EDGEDB_HOST",
"result": {
"address": [
"test.local",
12345
]
},
"warnings": [
"gel_and_edgedb"
]
},
{
"env": {
"EDGEDB_DATABASE": "test_db",
Expand Down
5 changes: 4 additions & 1 deletion tests/override/other.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,10 @@
5656
],
"secretKey": "nbwt_eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJlZGdlZGIuc2VydmVyLmFueV9yb2xlIjp0cnVlLCJpYXQiOjE2NjkzMTE3NjMsImlzcyI6ImxvY2FsLTEuaW50ZXJuYWwiLCJuZWJ1bGEuc2NvcGVzIjpbImFkbWluIl0sIm5lYnVsYS51c2VyX2lkIjoiM2U3ODU4YTgtNmJjNy0xMWVkLWFmNTAtMTdiMzkzMjlmZmEyIn0.9cS6-rR00fgmEmGu423IP3snJvmXe7ZGol7ZlYuHBNqmKGrWtTsMZPj-3C7dmureUmk3ZUttxioouPeAreKueg"
}
},
"warnings": [
"gel_and_edgedb"
]
},
{
"env": {
Expand Down
Loading