Skip to content

Commit

Permalink
Update tests to skip invalid hostname and invalid port tests when usi…
Browse files Browse the repository at this point in the history
…ng proxy

Signed-off-by: Andrew W. Harn <[email protected]>
  • Loading branch information
awharn committed Oct 17, 2024
1 parent 13fa0fd commit 4deb729
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ describe("zosmf check status", () => {

describe("Expected failures", () => {

it("should fail due to invalid port", async () => {
(!process.env.HTTP_PROXY && !process.env.HTTPS_PROXY ? it : it.skip)("should fail due to invalid port", async () => {
// update temporary zowe profile with an invalid port
const scriptPath = testEnvironment.workingDir + "_create_profile_invalid_port";
const bogusPort = 12345;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ describe("zosmf list systems", () => {

describe("Expected failures", () => {

it("should fail due to invalid port", async () => {
(!process.env.HTTP_PROXY && !process.env.HTTPS_PROXY ? it : it.skip)("should fail due to invalid port", async () => {
// update temporary zowe profile with an invalid port
const scriptPath = testEnvironment.workingDir + "_create_profile_invalid_port";
const bogusPort = 12345;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe("Check Status Api", () => {
expect(error.message).toContain(ZosmfMessages.missingSession.message);
});

it("should return with proper message for invalid hostname", async () => {
(!process.env.HTTP_PROXY && !process.env.HTTPS_PROXY ? it : it.skip)("should return with proper message for invalid hostname", async () => {
const badHostName = "badHost";
const badSession = new Session({
user: defaultSystem.zosmf.user,
Expand Down Expand Up @@ -98,7 +98,7 @@ describe("Check Status Api", () => {
expect(jsonCauseErrors.hostname).toEqual(badHostName);
});

it("should return with proper message for invalid port", async () => {
(!process.env.HTTP_PROXY && !process.env.HTTPS_PROXY ? it : it.skip)("should return with proper message for invalid port", async () => {
const badPort = 51342;
const badSession = new Session({
user: defaultSystem.zosmf.user,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe("List Defined Systems Api", () => {
expect(error.message).toContain(ZosmfMessages.missingSession.message);
});

it("should return with proper message for invalid hostname", async () => {
(!process.env.HTTP_PROXY && !process.env.HTTPS_PROXY ? it : it.skip)("should return with proper message for invalid hostname", async () => {
const badHostName = "badHost";
const badSession = new Session({
user: defaultSystem.zosmf.user,
Expand Down Expand Up @@ -98,7 +98,7 @@ describe("List Defined Systems Api", () => {
expect(jsonCauseErrors.hostname).toEqual(badHostName);
});

it("should return with proper message for invalid port", async () => {
(!process.env.HTTP_PROXY && !process.env.HTTPS_PROXY ? it : it.skip)("should return with proper message for invalid port", async () => {
const badPort = 9999;
const badSession = new Session({
user: defaultSystem.zosmf.user,
Expand Down

0 comments on commit 4deb729

Please sign in to comment.