Skip to content

Commit

Permalink
Ignore failed test for GCP to verify others test execution
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jmartinezramirez committed Jun 6, 2024
1 parent bff3f46 commit fcb620c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
12 changes: 12 additions & 0 deletions FIPS/src/test/java/net/snowflake/client/RunningOnGCP.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2012-2019 Snowflake Computing Inc. All right reserved.
*/
package net.snowflake.client;

/** Run tests only on specified cloud provider or ignore */
public class RunningOnGCP implements ConditionalIgnoreRule.IgnoreCondition {
public boolean isSatisfied() {
String cloudProvider = TestUtil.systemGetEnv("JDBC_TEST_CLOUD_PROVIDER");
return cloudProvider != null && cloudProvider.equalsIgnoreCase("GCP");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import javax.net.ssl.HttpsURLConnection;
import net.snowflake.client.AbstractDriverIT;
import net.snowflake.client.ConditionalIgnoreRule;
import net.snowflake.client.RunningOnGCP;
import net.snowflake.client.RunningOnGithubActions;
import net.snowflake.client.category.TestCategoryFips;
import net.snowflake.client.core.SecurityUtil;
Expand Down Expand Up @@ -290,6 +291,7 @@ public void testConnectUsingKeyPair() throws Exception {
}

@Test
@ConditionalIgnoreRule.ConditionalIgnore(condition = RunningOnGCP.class)
public void connectWithFipsAndQuery() throws SQLException {
try (Connection con = getConnection()) {
Statement statement = con.createStatement();
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/set_git_info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [[ -z "$GITHUB_ACTIONS" ]]; then
else
#
# GITHUB Actions
export JDBC_TEST_CLOUD_PROVIDER="$CLOUD_PROVIDER"
export JDBC_TEST_CLOUD_PROVIDER=$CLOUD_PROVIDER
if [[ "$CLOUD_PROVIDER" == "AZURE" ]]; then
SOURCE_PARAMETER_FILE=parameters_azure.json.gpg
elif [[ "$CLOUD_PROVIDER" == "GCP" ]]; then
Expand Down
4 changes: 3 additions & 1 deletion ci/test_windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pip install -U snowflake-connector-python

cd %GITHUB_WORKSPACE%

set JDBC_TEST_CLOUD_PROVIDER="%CLOUD_PROVIDER%"
set JDBC_TEST_CLOUD_PROVIDER=%CLOUD_PROVIDER%
if "%CLOUD_PROVIDER%"=="AZURE" (
set ENCODED_PARAMETERS_FILE=.github/workflows/parameters_azure.json.gpg
) else if "%CLOUD_PROVIDER%"=="GCP" (
Expand Down Expand Up @@ -49,6 +49,8 @@ echo [INFO] Database: %SNOWFLAKE_TEST_DATABASE%
echo [INFO] Schema: %SNOWFLAKE_TEST_SCHEMA%
echo [INFO] Warehouse: %SNOWFLAKE_TEST_WAREHOUSE%
echo [INFO] Role: %SNOWFLAKE_TEST_ROLE%
echo [INFO] PROVIDER: %JDBC_TEST_CLOUD_PROVIDER%


echo [INFO] Creating schema %SNOWFLAKE_TEST_SCHEMA%
pushd %GITHUB_WORKSPACE%\ci\container
Expand Down

0 comments on commit fcb620c

Please sign in to comment.