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

More Getting started with security doc fixes #45796

Merged
Merged
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
14 changes: 12 additions & 2 deletions docs/src/main/asciidoc/security-getting-started-tutorial.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public class UserResource {

Specify how security information is stored in the model by adding the following annotations to the `user` entity:

.`src/main/java/org/acme/security/jpa/PanacheEntity.java`
.`src/main/java/org/acme/security/jpa/User.java`
[source,java]
----
package org.acme.security.jpa;
Expand Down Expand Up @@ -331,7 +331,7 @@ quarkus.http.auth.basic=true
%prod.quarkus.datasource.db-kind=postgresql
%prod.quarkus.datasource.username=quarkus
%prod.quarkus.datasource.password=quarkus
%prod.quarkus.datasource.jdbc.url=jdbc:postgresql:security_jpa
%prod.quarkus.datasource.jdbc.url=jdbc:postgresql:quarkus

quarkus.hibernate-orm.database.generation=drop-and-create
----
Expand Down Expand Up @@ -421,6 +421,7 @@ include::{includes}/devtools/dev.adoc[]


In this scenario, `Dev Services for PostgreSQL` launches and configures a `PostgreSQL` test container.
Make sure that either `Podman` or `Docker` is installed on your computer.

To write the integration test, use the following code sample:

Expand Down Expand Up @@ -493,13 +494,22 @@ public class JpaSecurityRealmTest {

As you can see in this code sample, you do not need to start the test container from the test code.

To run these tests, choose `Press [r] to resume testing` option which is shown in the console after you started your application in dev mode.

[NOTE]
====
When you start your application in dev mode, Dev Services for PostgreSQL launches a PostgreSQL dev mode container so that you can start developing your application.
While developing your application, you can add and run tests individually by using the xref:continuous-testing.adoc[Continuous Testing] feature.
Dev Services for PostgreSQL supports testing while you develop by providing a separate PostgreSQL test container that does not conflict with the dev mode container.
====

Alternatively, you can run these tests using Maven:

[source,bash,subs=attributes+]
----
./mvnw test
----

== Test your application in production mode by using Curl or browser

To test your application using Curl or a browser start a PostgreSQL server first.
Expand Down
Loading