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

Undocumented IT requirement: Username "liquibase" #4413

Closed
2 tasks done
mkarg opened this issue Jun 21, 2023 · 0 comments · Fixed by #4414
Closed
2 tasks done

Undocumented IT requirement: Username "liquibase" #4413

mkarg opened this issue Jun 21, 2023 · 0 comments · Fixed by #4414

Comments

@mkarg
Copy link
Contributor

mkarg commented Jun 21, 2023

Search first

  • I searched and no similar issues were found

Description

Using latest SQL Anywhere 17.0.11-7254 as a standalone engine (without using testcontainers) I am trying to execute integration tests, and this is the result:

[ERROR] liquibase.dbtest.asany.SybaseASAIntegrationTest.testRerunDiffChangeLog  Time elapsed: 25.215 s  <<< ERROR!
liquibase.exception.CommandExecutionException:
liquibase.exception.LiquibaseException: liquibase.exception.MigrationFailedException: Migration failed for changeset changelogs/asany/complete/root.changelog.xml::16::nvoxland:
     Reason: liquibase.exception.DatabaseException: [SAP][JDBC Driver][SQL Anywhere]Benutzer-ID 'liquibase' ist nicht vorhanden [Failed SQL: (-140) CREATE VIEW lbuser.personView AS select * from liquibase.person]
        at liquibase.command.CommandScope.execute(CommandScope.java:235)
        at liquibase.Liquibase.lambda$update$0(Liquibase.java:237)
        at liquibase.Scope.lambda$child$0(Scope.java:194)
        at liquibase.Scope.child(Scope.java:203)
        at liquibase.Scope.child(Scope.java:193)
        at liquibase.Scope.child(Scope.java:172)
        at liquibase.Liquibase.runInScope(Liquibase.java:1603)
        at liquibase.Liquibase.update(Liquibase.java:229)
        at liquibase.Liquibase.update(Liquibase.java:213)
        at liquibase.Liquibase.update(Liquibase.java:198)
        at liquibase.Liquibase.update(Liquibase.java:187)
        at liquibase.dbtest.AbstractIntegrationTest.runChangeLogFile(AbstractIntegrationTest.java:348)
        at liquibase.dbtest.AbstractIntegrationTest.runCompleteChangeLog(AbstractIntegrationTest.java:336)
        at liquibase.dbtest.AbstractIntegrationTest.testRerunDiffChangeLog(AbstractIntegrationTest.java:640)

Apparently the ITs expect the existence of a db user named "liquibase", but unfortunately, no such requirement is told in https://contribute.liquibase.com/code/test-your-code/test-environments/ at all! Even worse, the username property by default is set to "lbuser" in liquibase.sdk.yaml (not to "liquibase") and not overridden in liquibase.sdk.local.yaml! I think we can do better and clearly describe the requirement to manually create a user name "liquibase" in https://contribute.liquibase.com/code/test-your-code/test-environments/.

NB: The problem can be worked around by manually creating the required user "liquibase" using the command dbisql -c DBF=.\liquibase.db;UID=lbuser;PWD=LiquibasePass1 "CREATE USER liquibase".

Steps To Reproduce

dbinit -dba lbuser,LiquibasePass1 liquibase
liquibase:
  sdk:
    testSystem:
      test: asany

      asany:
        url: jdbc:sqlanywhere:DBF=liquibase.db
mvn verify -Dtest=SybaseASAIntegrationTest -Dsurefire.failIfNoSpecifiedTests=false

Expected/Desired Behavior

  • ITs should pass successfully using the user name given in liquibase.sdk.yaml by default, hence without out the need to explicitly create a user named "liquibase".
  • The test documentation should unambiguously explain that the manual creation of a user named "liquibase" is required.

Liquibase Version

master

Database Vendor & Version

SAP SQL Anywhere 17.0.11

Liquibase Integration

N/A

Liquibase Extensions

N/A

OS and/or Infrastructure Type/Provider

Windows 10 Pro (German)

Additional Context

Standalone engine / Without Testcontainers

Are you willing to submit a PR?

  • I'm willing to submit a PR (Thank you!)
mkarg pushed a commit to mkarg/liquibase that referenced this issue Jun 21, 2023
…quibase"

Despite the title and description of issue liquibase#4413, the actual cause of
the failing IT was *not* an undocumented IT requirement, but the fact
that the author of the IT (unintentionally) used the static prefix
"liquibase" instead of the dynamic prefix provided by the test driver.

The solution hence is to replace the static prefix by the dynamic
prefix. Hence, there is nothing wrong with the test documentation.
mkarg added a commit to mkarg/liquibase that referenced this issue Jun 21, 2023
…quibase"

Despite the title and description of issue liquibase#4413, the actual cause of
the failing IT was *not* an undocumented IT requirement, but the fact
that the author of the IT (unintentionally) used the static prefix
"liquibase" instead of the dynamic prefix provided by the test driver.

The solution hence is to replace the static prefix by the dynamic
prefix. Hence, there is nothing wrong with the test documentation.
mkarg added a commit to mkarg/liquibase that referenced this issue Jun 21, 2023
…quibase"

Despite the title and description of issue liquibase#4413, the actual cause of
the failing IT was *not* an undocumented IT requirement, but the fact
that the author of the IT (unintentionally) used the static prefix
"liquibase" instead of the dynamic prefix provided by the test driver.

The solution hence is to replace the static prefix by the dynamic
prefix. Hence, there is nothing wrong with the test documentation.
filipelautert added a commit that referenced this issue Jun 29, 2023
Fixes issue #4413: Undocumented IT requirement: Username "liquibase"
@filipelautert filipelautert added this to the 1NEXT milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants