-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #523 from iExecBlockchainComputing/feature/platfor…
…m-registry Feature/platform registry
- Loading branch information
Showing
13 changed files
with
352 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/java/com/iexec/core/registry/PlatformRegistryConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.iexec.core.registry; | ||
|
||
import lombok.Getter; | ||
import org.hibernate.validator.constraints.URL; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Getter | ||
@Configuration | ||
public class PlatformRegistryConfiguration { | ||
|
||
@URL | ||
@Value("${sms.scone}") | ||
private String sconeSms; | ||
|
||
@URL | ||
@Value("${sms.gramine}") | ||
private String gramineSms; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/test/java/com/iexec/core/registry/PlatformRegistryConfigurationTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.iexec.core.registry; | ||
|
||
import org.assertj.core.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.test.context.ContextConfiguration; | ||
import org.springframework.test.context.TestPropertySource; | ||
import org.springframework.test.context.junit.jupiter.SpringExtension; | ||
|
||
@ExtendWith(SpringExtension.class) | ||
@ContextConfiguration(classes = PlatformRegistryConfiguration.class) | ||
@TestPropertySource(properties = { | ||
"sms.scone=http://scone-sms", | ||
"sms.gramine=http://gramine-sms" | ||
}) | ||
class PlatformRegistryConfigurationTests { | ||
|
||
@Autowired | ||
PlatformRegistryConfiguration platformRegistryConfiguration; | ||
|
||
@Test | ||
void shouldGetValues() { | ||
Assertions.assertThat(platformRegistryConfiguration.getSconeSms()) | ||
.isEqualTo("http://scone-sms"); | ||
Assertions.assertThat(platformRegistryConfiguration.getGramineSms()) | ||
.isEqualTo("http://gramine-sms"); | ||
} | ||
|
||
} |
Oops, something went wrong.