Skip to content

Commit c8678df

Browse files
Merge pull request #12 from contentstack/feat/DX-673-gcp-na-support
DX - 673 | gcp na support
2 parents c7ff1c3 + 5b46ec7 commit c8678df

File tree

8 files changed

+35
-12
lines changed

8 files changed

+35
-12
lines changed

.github/workflows/jira.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
pull_request:
44
types: [opened]
55
jobs:
6-
security:
6+
security-jira:
77
if: ${{ github.actor == 'dependabot[bot]' || github.actor == 'snyk-bot' || contains(github.event.pull_request.head.ref, 'snyk-fix-') || contains(github.event.pull_request.head.ref, 'snyk-upgrade-')}}
88
runs-on: ubuntu-latest
99
steps:

.github/workflows/sast-scan.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: SAST Scan
2+
on:
3+
pull_request:
4+
types: [opened, synchronize, reopened]
5+
jobs:
6+
security-sast:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Semgrep Scan
11+
run: docker run -v /var/run/docker.sock:/var/run/docker.sock -v "${PWD}:/src" returntocorp/semgrep semgrep scan --config auto

.github/workflows/sca-scan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Source Composition Analysis Scan
22
on:
33
pull_request:
4-
types: [ opened, synchronize, reopened ]
4+
types: [opened, synchronize, reopened]
55
jobs:
6-
security:
6+
security-sca:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@master

changelog.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
A brief description of what changes project contains
44

5-
#### v1.0.1
5+
#### v1.1.0
66

7-
- added surefire plugin to generate test report
7+
- added GCP_NA region support
88

99
## Introducing Release Of Java Marketplace SDK
1010

pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<url>https://github.com/contentstack/contentstack-management-java/</url>
1111

1212
<properties>
13-
<sdk.version>1.0.0</sdk.version>
13+
<sdk.version>1.1.0</sdk.version>
1414
<maven.compiler.target>9</maven.compiler.target>
1515
<maven.compiler.source>9</maven.compiler.source>
1616
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -19,11 +19,11 @@
1919
<maven-javadoc-plugin.version>3.0.0</maven-javadoc-plugin.version>
2020
<dotenv-source.version>5.2.2</dotenv-source.version>
2121
<rxjava-source.version>3.1.6</rxjava-source.version>
22-
<retrofit-source.version>2.9.0</retrofit-source.version>
23-
<converter-gson-version>2.9.0</converter-gson-version>
22+
<retrofit-source.version>2.10.0</retrofit-source.version>
23+
<converter-gson-version>2.10.0</converter-gson-version>
2424
<logging.version>4.10.0</logging.version>
2525
<jococo-plugin.version>0.8.7</jococo-plugin.version>
26-
<lombok-source.version>1.18.30</lombok-source.version>
26+
<lombok-source.version>1.18.32</lombok-source.version>
2727
<junit-jupiter.version>5.10.0</junit-jupiter.version>
2828
<junit-jupiter-engine.version>5.8.0-M1</junit-jupiter-engine.version>
2929
<junit-vintage-engine.version>5.10.0</junit-vintage-engine.version>
@@ -117,7 +117,7 @@
117117
<dependency>
118118
<groupId>org.jetbrains</groupId>
119119
<artifactId>annotations</artifactId>
120-
<version>24.0.1</version>
120+
<version>24.1.0</version>
121121
<scope>provided</scope>
122122
</dependency>
123123
<dependency>

src/main/java/com/contentstack/sdk/Region.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,8 @@ public enum Region {
2525
* Azure na region.
2626
*/
2727
AZURE_NA,
28+
/**
29+
* Gcp na region.
30+
*/
31+
GCP_NA,
2832
}

src/test/java/com/contentstack/sdk/TestClient.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ public static Marketplace getMarketplaceAzureEu() {
4747
.build();
4848
}
4949

50+
public static Marketplace getMarketplaceGcpNa() {
51+
return new Marketplace
52+
.Builder(TestClient.ORGANIZATION_UID)
53+
.host(HOST)
54+
.region(Region.GCP_NA)
55+
.build();
56+
}
57+
5058

5159
public static Marketplace getMarketplaceWithLogin() {
5260
return new Marketplace

src/test/java/com/contentstack/sdk/marketplace/MarketplaceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void testConstructorWithNullOrganizationUidAndWithValidHost() {
3636
//String organizationUid = "nullOrganizationUid123";
3737
String organizationUid = null;
3838
String host = "developerhub-api.contentstack.com";
39-
assertThrows(NullPointerException.class, () -> new Marketplace.Builder(organizationUid)
39+
assertThrows(IllegalArgumentException.class, () -> new Marketplace.Builder(organizationUid)
4040
.host(host)
4141
.build());
4242
}
@@ -63,7 +63,7 @@ void testConstructorWithNullOrganizationUid() {
6363
void testConstructorWithNullOrganizationUidNullCheck() {
6464
// Arrange
6565
String organizationUid = null;
66-
assertThrows(NullPointerException.class, () -> new Marketplace.Builder(organizationUid)
66+
assertThrows(IllegalArgumentException.class, () -> new Marketplace.Builder(organizationUid)
6767
.build());
6868
}
6969

0 commit comments

Comments
 (0)