Skip to content

Commit ee99acb

Browse files
fix(tests): Re-enable MQTT and Postgres tests
Signed-off-by: Karan <karanlokchandani@protonmail.com>
1 parent 4a99166 commit ee99acb

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

tests/runtime-tests/tests/outbound-postgres-variable-permission/spin.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ component = "test"
1414

1515
[component.test]
1616
source = "%{source=outbound-postgres}"
17-
allowed_outbound_hosts = ["postgres://{{ pg_host }}:%{port=5432}"]
18-
environment = { DB_URL = "postgres://postgres:postgres@localhost:%{port=5432}/spin_dev" }
17+
allowed_outbound_hosts = ["postgres://{{ pg_host }}:5432"]
18+
environment = { DB_URL = "postgres://postgres:postgres@localhost:5432/spin_dev" }

tests/runtime-tests/tests/outbound-postgres/spin.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ component = "test"
1111

1212
[component.test]
1313
source = "%{source=outbound-postgres}"
14-
allowed_outbound_hosts = ["postgres://localhost:%{port=5432}"]
15-
environment = { DB_URL = "postgres://postgres:postgres@localhost:%{port=5432}/spin_dev" }
14+
allowed_outbound_hosts = ["postgres://localhost:5432"]
15+
environment = { DB_URL = "postgres://postgres:postgres@localhost:5432/spin_dev" }

tests/runtime.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ mod runtime_tests {
1010
ignore: [
1111
// This test is flaky. Often gets "Connection reset by peer" errors.
1212
// https://github.com/spinframework/spin/issues/2265
13-
"outbound-postgres",
14-
"outbound-postgres-variable-permission"
13+
// "outbound-postgres",
14+
// "outbound-postgres-variable-permission"
1515
]
1616
);
1717

@@ -28,7 +28,7 @@ mod runtime_tests {
2828

2929
#[test]
3030
fn conformance_tests() -> anyhow::Result<()> {
31-
let config = conformance_tests::Config::new("canary").ignore("outbound-mqtt");
31+
let config = conformance_tests::Config::new("canary");
3232
let conclusion = conformance_tests::run_tests(config, move |test| {
3333
conformance::run_test(test, &spin_binary())
3434
})?;

tests/test-components/components/outbound-postgres/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ impl Component {
3232
ensure_matches!(rowset.rows[0][2], postgres::DbValue::Time((h, m, s, ns)) if h == 4 && m == 5 && s == 6 && ns == 789_000_000);
3333
ensure_matches!(rowset.rows[0][3], postgres::DbValue::Datetime((y, _, _, h, _, _, ns)) if y == 1989 && h == 1 && ns == 0);
3434
ensure_matches!(rowset.rows[1][1], postgres::DbValue::Date((y, m, d)) if y == 2525 && m == 12 && d == 25);
35-
ensure_matches!(rowset.rows[1][2], postgres::DbValue::Time((h, m, s, ns)) if h == 14 && m == 15 && s == 16 && ns == 17);
36-
ensure_matches!(rowset.rows[1][3], postgres::DbValue::Datetime((y, _, _, h, _, _, ns)) if y == 1989 && h == 1 && ns == 4);
35+
ensure_matches!(rowset.rows[1][2], postgres::DbValue::Time((h, m, s, ns)) if h == 14 && m == 15 && s == 16 && ns == 0);
36+
ensure_matches!(rowset.rows[1][3], postgres::DbValue::Datetime((y, _, _, h, _, _, ns)) if y == 1989 && h == 1 && ns == 1000);
3737

3838
let rowset = ensure_ok!(nullable(&conn));
3939
ensure!(rowset.rows.iter().all(|r| r.len() == 1));

0 commit comments

Comments
 (0)