Skip to content

Commit

Permalink
refactor(centralnic reseller registrar module): refactored and review…
Browse files Browse the repository at this point in the history
…ed code to support CNR module
  • Loading branch information
AsifNawaz-cnic committed Sep 3, 2024
1 parent a111f44 commit 9561cda
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ jobs:
with:
java-version: ${{ matrix.java-version }}
distribution: ${{ vars.RTLDEV_MW_CI_JAVA_DISTRO }}
- run: |
- name: Compile and Execute Test Run
env:
CNR_TEST_USER: ${{ secrets.CNR_TEST_USER }}
CNR_TEST_PASSWORD: ${{ secrets.CNR_TEST_PASSWORD }}
run: |
cd testapiconnector
mvn compile exec:java
10 changes: 5 additions & 5 deletions testapiconnector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>net.hexonet.testapiconnector</groupId>
<groupId>com.centralnicreseller.testapiconnector</groupId>
<artifactId>testapiconnector</artifactId>
<version>1.0-SNAPSHOT</version>

<name>testapiconnector</name>
<url>http://hexonet.net</url>
<url>https://centralnicreseller.com</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<exec.mainClass>net.hexonet.testapiconnector.App</exec.mainClass>
<exec.mainClass>com.centralnicreseller.testapiconnector.App</exec.mainClass>
</properties>

<dependencies>
<dependency>
<groupId>net.hexonet.apiconnector</groupId>
<groupId>io.github.centralnicgroup-opensource</groupId>
<artifactId>java-sdk</artifactId>
<version>4.0.18</version>
</dependency>
Expand Down Expand Up @@ -68,7 +68,7 @@
</execution>
</executions>
<configuration>
<mainClass>net.hexonet.testapiconnector.App</mainClass>
<mainClass>com.centralnicreseller.testapiconnector.App</mainClass>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package net.hexonet.testapiconnector;
package com.centralnicreseller.testapiconnector;

import java.util.HashMap;
import java.util.Map;
import net.hexonet.apiconnector.APIClient;
import net.hexonet.apiconnector.Response;
import com.centralnicreseller.apiconnector.APIClient;
import com.centralnicreseller.apiconnector.Response;

/**
* Hello world!
Expand All @@ -14,9 +14,7 @@ public static void main(String[] args) {

// perform an api login and create an api session
APIClient cl = new APIClient();
cl.useOTESystem().setCredentials("test.user", "test.passw0rd")
// --- use this if you have active ip filter settings ---
.setRemoteIPAddress("1.2.3.4");
cl.useOTESystem().setCredentials(System.getenv("CNR_TEST_USER"), System.getenv("CNR_TEST_PASSWORD"));

Response r = cl.login();
// --- use this for 2-Factor Auth ---
Expand Down

0 comments on commit 9561cda

Please sign in to comment.