GithubHelp home page GithubHelp logo

Comments (8)

danielpetisme avatar danielpetisme commented on May 26, 2024

Indeed, the tests rely on liquibase regardless of the database configuration.
Would definitively make sense to add a guard to prevent data migration related files to be produced.
For instance here
https://github.com/jhipster/jhipster-quarkus/blob/master/generators/server/templates/quarkus/src/test/java/package/web/rest/UserResourceTest.java.ejs#L93
adding

<%_ if (databaseType === 'sql') { _%>
   @BeforeEach
    public void databaseFixture() {
        try (Liquibase liquibase = liquibaseFactory.createLiquibase()) {
            liquibase.dropAll();
            liquibase.validate();
            liquibase.update(liquibaseFactory.createContexts(), liquibaseFactory.createLabels());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
<%_ }%>

Would do the job.

Fancy a PR?

from generator-jhipster-quarkus.

sgulci avatar sgulci commented on May 26, 2024

will do at the weekend

from generator-jhipster-quarkus.

joewhite101 avatar joewhite101 commented on May 26, 2024

Hey @sgulci were you able to get to this? If not maybe we can pick it up in the JHipster code day tomorrow. LMK.

from generator-jhipster-quarkus.

sgulci avatar sgulci commented on May 26, 2024

Ohh then you can pickup for jhipster code

from generator-jhipster-quarkus.

nshaw avatar nshaw commented on May 26, 2024

I made a start on this but could use another pair of eyes on it. This branch eliminates the liquibase errors but I still see 3 skipped tests once it's complete so I don't know if that's acceptable: https://github.com/nshaw/jhipster-quarkus/tree/76-no-db-tests-fail.

from generator-jhipster-quarkus.

avdev4j avatar avdev4j commented on May 26, 2024

hi,
I think the problem is more complex than that. I've checked your branch @nshaw but I thinks should include the data partial file. At the same time we have to add conditions on entities and User to not have @entity or any related code to Hibernate or JPA.

tests are failing because all the code related to databases are still presents and it tries to connect to a db that does not exists.

from generator-jhipster-quarkus.

nshaw avatar nshaw commented on May 26, 2024

@avdev4j feel free to start from scratch if you have time to dig into this. I'm afraid I made a first attempt and then never made it back to it.

from generator-jhipster-quarkus.

avdev4j avatar avdev4j commented on May 26, 2024

Hi @nshaw don't worry I'm working on it. Basically, an important part of the generated code will be removed when selected no db.

Pleas take a look of #122

Have a good day

from generator-jhipster-quarkus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.