Permalink
Browse files

Configure application properties for integration tests

Take note of the environment property in the database url.
  • Loading branch information...
michael-simons committed Aug 25, 2016
1 parent 18678e7 commit fcf755ad11f8fb7afa36ccaf7416d5674e621ba1
Showing with 23 additions and 0 deletions.
  1. +21 −0 src/test/resources/application-it.properties
  2. +2 −0 src/test/resources/data-it.sql
@@ -0,0 +1,21 @@
# Copyright 2016 EuregJUG.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
spring.datasource.platform = postgresql
spring.datasource.driver-class-name = org.postgresql.Driver
spring.datasource.url = jdbc:postgresql://localhost:${it-database.port}/postgres
spring.datasource.username = postgres
spring.datasource.password = postgres
spring.datasource.data = classpath:data-it.sql
@@ -0,0 +1,2 @@
insert into events(held_on, name, description) values(now(), 'test', 'test');
insert into registrations(event_id, email, name) select max(id), 'test@test.com', 'test' from events;

0 comments on commit fcf755a

Please sign in to comment.