diff options
author | Michael Hwang <mhwang@research.att.com> | 2018-03-22 11:02:57 -0400 |
---|---|---|
committer | Michael Hwang <mhwang@research.att.com> | 2018-03-26 10:56:24 -0400 |
commit | e65fc2fc02594a7c8640a6330b2373db1efb923e (patch) | |
tree | 4433e083f96dcb1ad26c6f73d437195d6d8f7a75 /src/test/resources | |
parent | 7f61b70d33879712c5dad64c04a5d54b2b065138 (diff) |
Add unit tests to reach 50% coverage
Ripped out the dcae controller code which is no longer
needed.
Change-Id: I43906edb80bcd5e25445ec2a7175c6748b0ab2ae
Signed-off-by: Michael Hwang <mhwang@research.att.com>
Issue-ID: DCAEGEN2-257
Diffstat (limited to 'src/test/resources')
-rw-r--r-- | src/test/resources/config-databus.yaml | 4 | ||||
-rw-r--r-- | src/test/resources/config-inventory.yaml | 88 |
2 files changed, 92 insertions, 0 deletions
diff --git a/src/test/resources/config-databus.yaml b/src/test/resources/config-databus.yaml new file mode 100644 index 0000000..f51c869 --- /dev/null +++ b/src/test/resources/config-databus.yaml @@ -0,0 +1,4 @@ +host: databus-controller-hostname +port: 8443 +mechId: some-mech-id +password: some-mech-password diff --git a/src/test/resources/config-inventory.yaml b/src/test/resources/config-inventory.yaml new file mode 100644 index 0000000..3206566 --- /dev/null +++ b/src/test/resources/config-inventory.yaml @@ -0,0 +1,88 @@ +# The database config was lifted from https://dropwizard.github.io/dropwizard/0.7.1/docs/manual/jdbi.html +database: + # the name of your JDBC driver + driverClass: org.postgresql.Driver + + # the username + user: postgres + + # the password + password: test123 + + # the JDBC URL + # TODO: Probably want to programmatically set the database name. + url: jdbc:postgresql://127.0.0.1:5432/dcae_inv + + # any properties specific to your JDBC driver: + properties: + charSet: UTF-8 + + # the maximum amount of time to wait on an empty pool before throwing an exception + maxWaitForConnection: 1s + + # the SQL query to run when validating a connection's liveness + validationQuery: "/* MyService Health Check */ SELECT 1" + + # the minimum number of connections to keep open + minSize: 2 + + # the maximum number of connections to keep open + maxSize: 8 + + initialSize: 2 + + # whether or not idle connections should be validated + checkConnectionWhileIdle: false + + # the amount of time to sleep between runs of the idle connection validation, abandoned cleaner and idle pool resizing + evictionInterval: 10s + + # the minimum amount of time an connection must sit idle in the pool before it is eligible for eviction + minIdleTime: 1 minute + +databusControllerConnection: + host: databus-controller-hostname + port: 8443 + mechId: some-mech-id + password: some-password + +httpClient: + # The minimum number of threads to use for asynchronous calls. + minThreads: 1 + + # The maximum number of threads to use for asynchronous calls. + maxThreads: 128 + + # If true, the client will automatically decode response entities + # with gzip content encoding. + gzipEnabled: false + + # If true, the client will encode request entities with gzip + # content encoding. (Requires gzipEnabled to be true). + gzipEnabledForRequests: false + + # Requests to databus controller were timing out so I bumped it up 4x of default + timeout: 5000milliseconds + connectionTimeout: 5000milliseconds + +server: + # requestLog is for those messages you see right when the service handles HTTP requests + requestLog: + appenders: + - type: file + currentLogFilename: /opt/logs/DCAE/inventory/audit.log + archive: true + archivedLogFilenamePattern: /opt/logs/DCAE/inventory/audit-%d.log.gz + archivedFileCount: 10 + - type: console + +# Rolling is c.q.l.core.rolling.TimeBasedRollingPolicy +logging: + level: INFO + appenders: + - type: file + currentLogFilename: /opt/logs/DCAE/inventory/audit.log + archive: true + archivedLogFilenamePattern: /opt/logs/DCAE/inventory/audit-%d.log.gz + archivedFileCount: 10 + - type: console |