Skip to content

Commit

Permalink
More Getting started with security doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sberyozkin committed Jan 22, 2025
1 parent 32144de commit 58d266c
Showing 1 changed file with 12 additions and 2 deletions.
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 @@ -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 All @@ -510,7 +520,7 @@ Then, compile and run your application in either JVM or native mode.
[source,bash]
----
docker run --rm=true --name security-getting-started -e POSTGRES_USER=quarkus \
-e POSTGRES_PASSWORD=quarkus -e POSTGRES_DB=quarkus \
-e POSTGRES_PASSWORD=quarkus -e POSTGRES_DB=security_jpa \
-p 5432:5432 postgres:17
----

Expand Down

0 comments on commit 58d266c

Please sign in to comment.