Skip to content

Commit

Permalink
chore(test): Fixed namespace in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Helber Belmiro <[email protected]>
  • Loading branch information
hbelmiro committed Jan 21, 2025
1 parent 3e423d8 commit c4b0fc7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,12 @@ jobs:
- name: Forward API port
run: ./.github/resources/scripts/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888

- name: Forward MySQL port
run: ./.github/resources/scripts/forward-port.sh "kubeflow" "mysql" 3306 3306

- name: API integration tests v1
working-directory: ./backend/test/integration
run: go test -v ./... -namespace ${NAMESPACE} -args -runIntegrationTests=true
run: go test -v ./... -namespace kubeflow -args -runIntegrationTests=true

- name: Collect test results
if: always()
Expand Down Expand Up @@ -145,7 +148,7 @@ jobs:

- name: API integration tests v2
working-directory: ./backend/test/v2/integration
run: go test -v ./... -namespace ${NAMESPACE} -args -runIntegrationTests=true
run: go test -v ./... -namespace kubeflow -args -runIntegrationTests=true

- name: Collect test results
if: always()
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/upgrade-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,21 @@ jobs:
with:
k8s_version: ${{ matrix.k8s_version }}

- name: Forward API port
run: ./.github/resources/scripts/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888

- name: Prepare upgrade tests
working-directory: backend/test/integration
run: go test -v ./... -namespace ${NAMESPACE} -args -runUpgradeTests=true -testify.m=Prepare
run: go test -v ./... -namespace kubeflow -args -runUpgradeTests=true -testify.m=Prepare

- name: Prepare verification tests
working-directory: backend/test/integration
run: go test -v ./... -namespace ${NAMESPACE} -args -runUpgradeTests=true -testify.m=Verify
run: go test -v ./... -namespace kubeflow -args -runUpgradeTests=true -testify.m=Verify

- name: Prepare upgrade tests v2
working-directory: backend/test/v2/integration/
run: go test -v ./... -namespace ${NAMESPACE} -args -runUpgradeTests=true -testify.m=Prepare
run: go test -v ./... -namespace kubeflow -args -runUpgradeTests=true -testify.m=Prepare

- name: Prepare verification tests v2
working-directory: backend/test/v2/integration
run: go test -v ./... -namespace ${NAMESPACE} -args -runUpgradeTests=true -testify.m=Verify
run: go test -v ./... -namespace kubeflow -args -runUpgradeTests=true -testify.m=Verify
4 changes: 1 addition & 3 deletions backend/test/integration/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ func (s *DBTestSuite) TestInitDBClient_MySQL() {
viper.Set("DBDriverName", "mysql")
viper.Set("DBConfig.MySQLConfig.DBName", "mlpipeline")
// The default port-forwarding IP address that test uses is different compared to production
if *localTest {
viper.Set("DBConfig.MySQLConfig.Host", "localhost")
}
viper.Set("DBConfig.MySQLConfig.Host", "localhost")
duration, _ := time.ParseDuration("1m")
db := cm.InitDBClient(duration)
assert.NotNil(t, db)
Expand Down

0 comments on commit c4b0fc7

Please sign in to comment.