-
Notifications
You must be signed in to change notification settings - Fork 2
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 #117 from contentstack/next
GCP support implementation
- Loading branch information
Showing
9 changed files
with
62 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
# CHANGELOG | ||
|
||
## v1.14.0 | ||
|
||
### Date: 13-May-2024 | ||
|
||
-GCP support implementation | ||
|
||
## v1.13.1 | ||
|
||
### Date: 16-Apr-2024 | ||
|
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
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,36 @@ | ||
package com.contentstack.sdk; | ||
|
||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class TestGcpRegion { | ||
@Test | ||
void testGcpRegionBehaviourGcpNA() { | ||
Config config = new Config(); | ||
Config.ContentstackRegion region = Config.ContentstackRegion.GCP_NA; | ||
config.setRegion(region); | ||
Assertions.assertFalse(config.region.name().isEmpty()); | ||
Assertions.assertEquals("GCP_NA", config.region.name()); | ||
} | ||
|
||
@Test | ||
void testGcpNaRegionBehaviourGcpStack() throws IllegalAccessException { | ||
Config config = new Config(); | ||
Config.ContentstackRegion region = Config.ContentstackRegion.GCP_NA; | ||
config.setRegion(region); | ||
Stack stack = Contentstack.stack("fakeApiKey", "fakeDeliveryToken", "fakeEnvironment", config); | ||
Assertions.assertFalse(config.region.name().isEmpty()); | ||
Assertions.assertEquals("GCP_NA", stack.config.region.name()); | ||
} | ||
|
||
@Test | ||
void testGcpNARegionBehaviourGcpStackHost() throws IllegalAccessException { | ||
Config config = new Config(); | ||
Config.ContentstackRegion region = Config.ContentstackRegion.GCP_NA; | ||
config.setRegion(region); | ||
Stack stack = Contentstack.stack("fakeApiKey", "fakeDeliveryToken", "fakeEnvironment", config); | ||
Assertions.assertFalse(config.region.name().isEmpty()); | ||
Assertions.assertEquals("gcp-na-cdn.contentstack.com", stack.config.host); | ||
|
||
} | ||
} |
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