Skip to content

Commit

Permalink
FIR-32732: remove EnvironmentManager (because now GitHub actions work…
Browse files Browse the repository at this point in the history
… for engine v2)
  • Loading branch information
alexradzin committed May 2, 2024
1 parent 8be3fc1 commit d608d19
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 105 deletions.
18 changes: 2 additions & 16 deletions .github/workflows/integration-test-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ on:
description: 'Account'
required: true
type: string
run_setup:
description: 'Run setup database and engine using GitHub action'
required: true
type: boolean
default: true
secrets:
FIREBOLT_CLIENT_ID_STG_NEW_IDN:
required: true
Expand Down Expand Up @@ -50,7 +45,7 @@ jobs:

- name: Setup database and engine
id: setup
if: ${{ (inputs.database == '') && (inputs.run_setup == true) }}
if: ${{ inputs.database == '' }}
uses: firebolt-db/integration-testing-setup@v2
with:
firebolt-client-id: ${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }}
Expand All @@ -77,14 +72,5 @@ jobs:
echo "engine_name=${{ steps.setup.outputs.engine_name }}" >> $GITHUB_OUTPUT
fi
- name: Setup env by build
id: setup-env
run: |
if [ ${{ inputs.run_setup }} == true ]; then
echo "run_setup=false" >> $GITHUB_OUTPUT
else
echo "run_setup=true" >> $GITHUB_OUTPUT
fi
- name: Run integration tests
run: ./gradlew integrationTest -Ddb=${{ steps.find-database-name.outputs.database_name }} -Denv=staging -Dclient_secret="${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }}" -Dclient_id="${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }}" -Daccount="${{ inputs.account }}" -Dengine="${{ steps.find-engine-name.outputs.engine_name }}" -DexcludeTags=v1 -Drun_setup="${{ steps.setup-env.outputs.run_setup }}"
run: ./gradlew integrationTest -Ddb=${{ steps.find-database-name.outputs.database_name }} -Denv=staging -Dclient_secret="${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }}" -Dclient_id="${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }}" -Daccount="${{ inputs.account }}" -Dengine="${{ steps.find-engine-name.outputs.engine_name }}" -DexcludeTags=v1
2 changes: 0 additions & 2 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ jobs:
database: ${{ inputs.database2 }}
engine: ${{ inputs.engine2 }}
account: ${{ vars.FIREBOLT_ACCOUNT_V1 }}
run_setup: true
secrets:
FIREBOLT_CLIENT_ID_STG_NEW_IDN: ${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }}
FIREBOLT_CLIENT_SECRET_STG_NEW_IDN: ${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }}
Expand All @@ -79,7 +78,6 @@ jobs:
database: ${{ inputs.database-with-engine-v2 }}
engine: ${{ inputs.engine_v2_fb_2_0 }}
account: ${{ vars.FIREBOLT_ACCOUNT_V2 }}
run_setup: false
secrets:
FIREBOLT_CLIENT_ID_STG_NEW_IDN: ${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }}
FIREBOLT_CLIENT_SECRET_STG_NEW_IDN: ${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }}
Expand Down
22 changes: 0 additions & 22 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import java.util.jar.JarFile
import java.util.stream.Stream

import static java.util.stream.Collectors.toList

plugins {
id 'java'
Expand Down Expand Up @@ -115,25 +112,6 @@ test {
}

tasks.register('integrationTest', Test) {
// doFirst {
// if (Boolean.parseBoolean(System.getProperty("run_setup", "false"))) {
// URL[] urls = Stream.concat(sourceSets.integrationTest.output.getFiles().stream(), sourceSets.integrationTest.compileClasspath.getFiles().stream())
// .map(f -> f.toURI().toURL()).collect(toList()).toArray()
// ClassLoader classLoader = new URLClassLoader(urls)
// def mgr = classLoader.loadClass("integration.EnvironmentManager").newInstance(new Object[0]);
// ext.environmentManager = mgr
// Properties props = mgr.create()
// props.each {
// systemProperty it.key, it.value
// }
// }
// }
// doLast {
// if (Boolean.parseBoolean(System.getProperty("run_setup", "false"))) {
// def mgr = ext.environmentManager
// mgr.cleanup()
// }
// }
description = 'Runs integration tests.'
useJUnitPlatform() {
includeTags(System.getProperty("includeTags", "common").split(","))
Expand Down
65 changes: 0 additions & 65 deletions src/integrationTest/java/integration/EnvironmentManager.java

This file was deleted.

0 comments on commit d608d19

Please sign in to comment.