Skip to content

Commit

Permalink
chore(ResponseTest.java): Updated contents of string for CommandPlain…
Browse files Browse the repository at this point in the history
…Secure test.
  • Loading branch information
AsifNawaz-cnic committed Nov 8, 2023
1 parent b74cb8d commit b64d6aa
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 19 deletions.
15 changes: 15 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// .devcontainer/devcontainer.json
{
"name": "Java",
"image": "mcr.microsoft.com/devcontainers/java",
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
}
},
"extensions": [
"vscjava.vscode-java-pack"
]
}
}
14 changes: 8 additions & 6 deletions .github/workflows/auto-merge-dependabot-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@ on:
- opened
- synchronize

permissions:
contents: write
pull-requests: write

jobs:
tests:
uses: ./.github/workflows/test.yml
secrets: inherit

permissions:
contents: read

dependabot:
name: Auto-merge Dependabot PR
runs-on: ubuntu-latest
runs-on: ${{ vars.RTLDEV_MW_CI_OS }}
needs: tests
permissions:
contents: write
pull-requests: write

if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@ on:
- master

jobs:
build:
name: Build
tests:
uses: ./.github/workflows/test.yml

secrets: inherit
permissions:
contents: read

release:
name: Release @ ubuntu-latest
runs-on: ubuntu-latest
name: Release @ ${{ vars.RTLDEV_MW_CI_OS }}
runs-on: ${{ vars.RTLDEV_MW_CI_OS }}
needs: build
permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
# as the build names above change each time Node versions change
lint:
name: 🧪 Linting
runs-on: ubuntu-latest
runs-on: ${{ vars.RTLDEV_MW_CI_OS }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -26,11 +26,11 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

test_matrix:
runs-on: ubuntu-latest
runs-on: ${{ vars.RTLDEV_MW_CI_OS }}

strategy:
matrix:
java-version: ${{ fromJson(vars.RTLDEV_MW_CI_JAVA_MATRIX) }}
# matrix:
# java-version: ${{ fromJson(vars.RTLDEV_MW_CI_JAVA_MATRIX) }}

name: 🧪 Testing
needs: lint
Expand All @@ -41,10 +41,10 @@ jobs:
with:
fetch-depth: 0
persist-credentials: false
- name: Java JDK @^${{ matrix.java-version }}
- name: Java JDK @^21
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
java-version: 21
distribution: ${{ vars.RTLDEV_MW_CI_JAVA_DISTRO }}
- name: Validate & Coverage Report
run: |
Expand Down
6 changes: 5 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
<version>3.6.2</version>
<configuration>
<verbose>true</verbose>
<source>8</source>
<additionalOptions>-html5</additionalOptions>
</configuration>
<executions>
Expand Down Expand Up @@ -123,6 +122,11 @@
<artifactId>maven-install-plugin</artifactId>
<version>3.1.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.4.5</version> <!-- Use the desired version -->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/net/hexonet/apiconnector/ResponseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void getCommandPlainSecure() {
cmd.put("SUBUSER", "test.user");
cmd.put("PASSWORD", "test.passw0rd");
Response r = new Response("", cmd);
String str = "SUBUSER = test.user\nCOMMAND = CheckAuthentication\nPASSWORD = ***\n";
String str = "SUBUSER = test.user\nPASSWORD = ***\nCOMMAND = CheckAuthentication\n";
assertEquals(str, r.getCommandPlain());
}

Expand Down

0 comments on commit b64d6aa

Please sign in to comment.