Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snow 1016467 cloud provider executions test ignores #1797

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,19 @@ jobs:

test-windows:
needs: build
name: ${{ matrix.cloud }} Windows java ${{ matrix.javaVersion }} JDBC${{ matrix.additionalMavenProfile }} ${{ matrix.category }}
name: ${{ matrix.runConfig.cloud }} Windows java ${{ matrix.runConfig.javaVersion }} JDBC${{ matrix.additionalMavenProfile }} ${{ matrix.category }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
cloud: [ 'AWS' ]
javaVersion: [ '8', '11', '17']
runConfig: [ {cloud: 'AWS', javaVersion: '8'}, {cloud: 'GCP', javaVersion: '11'}, {cloud: 'AZURE', javaVersion: '17'}]
category: ['TestCategoryResultSet,TestCategoryOthers,TestCategoryLoader', 'TestCategoryConnection,TestCategoryStatement', 'TestCategoryArrow,TestCategoryCore', 'TestCategoryFips']
additionalMavenProfile: ['', '-Dthin-jar']
additionalMavenProfile: ['']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.javaVersion }}
java-version: ${{ matrix.runConfig.javaVersion }}
distribution: 'temurin'
cache: maven
- uses: actions/setup-python@v4
Expand All @@ -62,27 +61,26 @@ jobs:
shell: cmd
env:
PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
CLOUD_PROVIDER: ${{ matrix.cloud }}
CLOUD_PROVIDER: ${{ matrix.runConfig.cloud }}
JDBC_TEST_CATEGORY: ${{ matrix.category }}
ADDITIONAL_MAVEN_PROFILE: ${{ matrix.additionalMavenProfile }}
run: ci\\test_windows.bat

test-mac:
needs: build
name: ${{ matrix.cloud }} Mac java ${{ matrix.javaVersion }} JDBC${{ matrix.additionalMavenProfile }} ${{ matrix.category }}
name: ${{ matrix.runConfig.cloud }} Mac java ${{ matrix.runConfig.javaVersion }} JDBC${{ matrix.additionalMavenProfile }} ${{ matrix.category }}
runs-on: macos-13
strategy:
fail-fast: false
matrix:
cloud: [ 'AWS' ]
javaVersion: [ '8', '11', '17']
runConfig: [ {cloud: 'AWS', javaVersion: '8'}, {cloud: 'GCP', javaVersion: '11'}, {cloud: 'AZURE', javaVersion: '17'}]
category: ['TestCategoryResultSet,TestCategoryOthers,TestCategoryLoader', 'TestCategoryConnection,TestCategoryStatement', 'TestCategoryArrow,TestCategoryCore', 'TestCategoryFips']
additionalMavenProfile: ['', '-Dthin-jar']
additionalMavenProfile: ['']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.javaVersion }}
java-version: ${{ matrix.runConfig.javaVersion }}
distribution: 'temurin'
cache: maven
- uses: actions/setup-python@v4
Expand All @@ -95,7 +93,7 @@ jobs:
shell: bash
env:
PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
CLOUD_PROVIDER: ${{ matrix.cloud }}
CLOUD_PROVIDER: ${{ matrix.runConfig.cloud }}
JDBC_TEST_CATEGORY: ${{ matrix.category }}
ADDITIONAL_MAVEN_PROFILE: ${{ matrix.additionalMavenProfile }}
run: /usr/local/bin/bash ./ci/test_mac.sh
Expand All @@ -108,7 +106,7 @@ jobs:
fail-fast: false
matrix:
image: [ 'jdbc-centos7-openjdk8', 'jdbc-centos7-openjdk11', 'jdbc-centos7-openjdk17' ]
cloud: [ 'AWS' ]
cloud: [ 'AWS', 'AZURE', 'GCP' ]
category: ['TestCategoryResultSet,TestCategoryOthers,TestCategoryLoader', 'TestCategoryConnection,TestCategoryStatement', 'TestCategoryArrow,TestCategoryCore', 'TestCategoryFips']
additionalMavenProfile: ['', '-Dthin-jar']
steps:
Expand All @@ -130,7 +128,7 @@ jobs:
fail-fast: false
matrix:
image: [ 'jdbc-centos7-openjdk8' ]
cloud: [ 'AWS' ]
cloud: [ 'AWS', 'AZURE', 'GCP' ]
category: ['TestCategoryResultSet,TestCategoryOthers', 'TestCategoryConnection,TestCategoryStatement', 'TestCategoryCore,TestCategoryLoader']
is_old_driver: ['true']
steps:
Expand Down
Binary file added .github/workflows/parameters_azure.json.gpg
Binary file not shown.
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("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
1 change: 1 addition & 0 deletions ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ for name in "${!TARGET_TEST_IMAGES[@]}"; do
-e BUILD_NUMBER \
-e JDBC_TEST_CATEGORY \
-e ADDITIONAL_MAVEN_PROFILE \
-e CLOUD_PROVIDER \
-e is_old_driver \
--add-host=snowflake.reg.local:${IP_ADDR} \
--add-host=s3testaccount.reg.local:${IP_ADDR} \
Expand Down
1 change: 1 addition & 0 deletions ci/test_windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ 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: %CLOUD_PROVIDER%

echo [INFO] Creating schema %SNOWFLAKE_TEST_SCHEMA%
pushd %GITHUB_WORKSPACE%\ci\container
Expand Down
12 changes: 12 additions & 0 deletions src/test/java/net/snowflake/client/RunningNotOnAWS.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2012-2024 Snowflake Computing Inc. All right reserved.
*/
package net.snowflake.client;

/** Run tests only on specified cloud provider or ignore */
public class RunningNotOnAWS implements ConditionalIgnoreRule.IgnoreCondition {
public boolean isSatisfied() {
String cloudProvider = TestUtil.systemGetEnv("CLOUD_PROVIDER");
return cloudProvider != null && !cloudProvider.equalsIgnoreCase("AWS");
}
}
12 changes: 12 additions & 0 deletions src/test/java/net/snowflake/client/RunningNotOnAzure.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2012-2024 Snowflake Computing Inc. All right reserved.
*/
package net.snowflake.client;

/** Run tests only on specified cloud provider or ignore */
public class RunningNotOnAzure implements ConditionalIgnoreRule.IgnoreCondition {
public boolean isSatisfied() {
String cloudProvider = TestUtil.systemGetEnv("CLOUD_PROVIDER");
return cloudProvider != null && !cloudProvider.equalsIgnoreCase("Azure");
}
}
12 changes: 12 additions & 0 deletions src/test/java/net/snowflake/client/RunningNotOnGCP.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2012-2024 Snowflake Computing Inc. All right reserved.
*/
package net.snowflake.client;

/** Run tests only on specified cloud provider or ignore */
public class RunningNotOnGCP implements ConditionalIgnoreRule.IgnoreCondition {
public boolean isSatisfied() {
String cloudProvider = TestUtil.systemGetEnv("CLOUD_PROVIDER");
return cloudProvider != null && !cloudProvider.equalsIgnoreCase("GCP");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,7 @@ public void testReadOnly() throws Throwable {
}

@Test
// @ConditionalIgnoreRule.ConditionalIgnore(condition = RunningNotOnAWS.class)
public void testDownloadStreamWithFileNotFoundException() throws SQLException {
try (Connection connection = getConnection();
Statement statement = connection.createStatement()) {
Expand Down
Loading