Skip to content

Commit

Permalink
temporary disable proxy tests on github actions mac
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-akolodziejczyk committed Jul 19, 2024
1 parent 83a74eb commit eafcc69
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: 'localhost access workaround'
run: |
echo -e "127.0.0.1 $(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts
echo -e "" | sudo tee -a /etc/hosts
- name: Install Homebrew Bash
shell: bash
run: brew install bash
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (c) 2012-2019 Snowflake Computing Inc. All right reserved.
*/
package net.snowflake.client;

import net.snowflake.client.core.Constants;

public class RunningNotOnGithubActionsMac implements ConditionalIgnoreRule.IgnoreCondition {
public boolean isSatisfied() {
return TestUtil.systemGetEnv("GITHUB_ACTIONS") != null && Constants.getOS() == Constants.OS.MAC;
}

public static boolean isRunningOnGithubActionsMac() {
return TestUtil.systemGetEnv("GITHUB_ACTIONS") != null && Constants.getOS() == Constants.OS.MAC;
}
}
8 changes: 6 additions & 2 deletions src/test/java/net/snowflake/client/jdbc/ProxyLatestIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.Objects;
import java.util.Properties;
import java.util.logging.Logger;
import net.snowflake.client.RunningNotOnGithubActionsMac;
import net.snowflake.client.RunningNotOnJava21;
import net.snowflake.client.RunningNotOnJava8;
import net.snowflake.client.category.TestCategoryOthers;
Expand Down Expand Up @@ -54,7 +55,7 @@ public class ProxyLatestIT {
private static final String WIREMOCK_FILE_NAME = "wiremock-standalone-3.8.0.jar";
public static final String WIREMOCK_STANDALONE_URL =
"https://repo1.maven.org/maven2/org/wiremock/wiremock-standalone/3.8.0/wiremock-standalone-3.8.0.jar";
private static final String WIREMOCK_HOST = "127.0.0.1";
private static final String WIREMOCK_HOST = "localhost";
private static final String TRUST_STORE_PROPERTY = "javax.net.ssl.trustStore";
private static int httpProxyPort;
private static int httpsProxyPort;
Expand All @@ -66,6 +67,10 @@ public static void setUpClass() {
downloadWiremock();
assumeFalse(RunningNotOnJava8.isRunningOnJava8());
assumeFalse(RunningNotOnJava21.isRunningOnJava21());
assumeFalse(
RunningNotOnGithubActionsMac
.isRunningOnGithubActionsMac()); // disabled until issue with access to localhost is
// fixed on github actions mac image
originalTrustStorePath = systemGetProperty(TRUST_STORE_PROPERTY);
}

Expand Down Expand Up @@ -185,7 +190,6 @@ private void startWiremockStandAlone() {
getResourceURL("wiremock" + File.separator + "ca-cert.jks"),
"--ca-keystore",
getResourceURL("wiremock" + File.separator + "ca-cert.jks"))
.inheritIO()
.start();
waitForWiremock();
return true;
Expand Down

0 comments on commit eafcc69

Please sign in to comment.