From 447ebc6410271cf7e3b6d2a12ffef3d53402c936 Mon Sep 17 00:00:00 2001 From: Q1nt Date: Tue, 10 Jul 2018 10:35:29 +0300 Subject: [PATCH] Replace discontinued fixer.io exchange-rates api with Discontinued fixer.io exchange-rates provider was replaced with exchangeratesapi.io It's claimed to be compatible with fixer.io, so no additional changes required --- config/src/main/resources/shared/statistics-service.yml | 2 +- .../piggymetrics/statistics/client/ExchangeRatesClientTest.java | 2 ++ statistics-service/src/test/resources/application.yml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/src/main/resources/shared/statistics-service.yml b/config/src/main/resources/shared/statistics-service.yml index b6619b2fbc..a05449fdd0 100644 --- a/config/src/main/resources/shared/statistics-service.yml +++ b/config/src/main/resources/shared/statistics-service.yml @@ -21,4 +21,4 @@ server: port: 7000 rates: - url: http://api.fixer.io \ No newline at end of file + url: https://exchangeratesapi.io/api \ No newline at end of file diff --git a/statistics-service/src/test/java/com/piggymetrics/statistics/client/ExchangeRatesClientTest.java b/statistics-service/src/test/java/com/piggymetrics/statistics/client/ExchangeRatesClientTest.java index 45624fe256..5ab56b48cf 100644 --- a/statistics-service/src/test/java/com/piggymetrics/statistics/client/ExchangeRatesClientTest.java +++ b/statistics-service/src/test/java/com/piggymetrics/statistics/client/ExchangeRatesClientTest.java @@ -30,6 +30,8 @@ public void shouldRetrieveExchangeRates() { assertEquals(container.getBase(), Currency.getBase()); assertNotNull(container.getRates()); + assertNotNull(container.getRates().get(Currency.EUR.name())); + assertNotNull(container.getRates().get(Currency.RUB.name())); } } \ No newline at end of file diff --git a/statistics-service/src/test/resources/application.yml b/statistics-service/src/test/resources/application.yml index 0e8852a06a..424a56e455 100644 --- a/statistics-service/src/test/resources/application.yml +++ b/statistics-service/src/test/resources/application.yml @@ -13,4 +13,4 @@ spring: port: 0 rates: - url: http://api.fixer.io \ No newline at end of file + url: https://exchangeratesapi.io/api \ No newline at end of file