Skip to content

Wrong credentials are not rejected #5

@hfhbd

Description

@hfhbd

Hey,
we want to use this action to setup a PostgreSQL database for this driver, but when using this action, wrong credentials are not rejected.

PR: hfhbd/postgres-native-sqldelight#82
Action: https://github.com/hfhbd/postgres-native-sqldelight/actions/runs/3265115620/jobs/5366815730

GitHub action setup:

- uses: ikalnytskyi/action-setup-postgres@v3
  with:
    password: password

test code:

assertFailsWith<IllegalArgumentException> {
  PostgresNativeDriver(
    host = "localhost",
    user = "postgres",
    database = "postgres",
    password = "wrongPassword"
  )
}

Failing test output:

kotlin.AssertionError: Expected an exception of kotlin.IllegalArgumentException to be thrown, but was completed successfully.
	at kotlin.Throwable#<init>(Unknown Source)
	at kotlin.Error#<init>(Unknown Source)
	at kotlin.AssertionError#<init>(Unknown Source)
	at kotlin.test.DefaultAsserter#fail(Unknown Source)
	at kotlin.test#checkResultIsFailure(Unknown Source)
	at app.softwork.sqldelight.postgresdriver.PostgresNativeDriverTest#wrongCredentials(Unknown Source)
	at app.softwork.sqldelight.postgresdriver.$PostgresNativeDriverTest$test$0.$wrongCredentials$FUNCTION_REFERENCE$4.invoke#internal(Unknown Source)
	at app.softwork.sqldelight.postgresdriver.$PostgresNativeDriverTest$test$0.$wrongCredentials$FUNCTION_REFERENCE$4.$<bridge-UNNN>invoke(Unknown Source)
	at kotlin.native.internal.test.BaseClassSuite.TestCase#run(Unknown Source)
	at kotlin.native.internal.test.TestRunner.run#internal(Unknown Source)
	at kotlin.native.internal.test.TestRunner.runIteration#internal(Unknown Source)
	at kotlin.native.internal.test.TestRunner#run(Unknown Source)
	at kotlin.native.internal.test#testLauncherEntryPoint(Unknown Source)
	at kotlin.native.internal.test#main(Unknown Source)
	at <global>.Konan_start(Unknown Source)
	at <global>.Init_and_run_start(Unknown Source)
	at <global>.__libc_start_main(Unknown Source)
	at <global>.0x0(Unknown Source)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions