Skip to content

Commit 8a50e87

Browse files
authored
Update test file path (#78)
* Use updated odo 3.0 commands for Pytest tests Signed-off-by: Joseph Kim <[email protected]>
1 parent c00dfe7 commit 8a50e87

File tree

4 files changed

+11
-15
lines changed

4 files changed

+11
-15
lines changed

.github/workflows/pytest_odo.251.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636

3737
steps:
3838
- name: Check out repository code
39-
uses: actions/checkout@v2
39+
uses: actions/checkout@v3
4040

4141
- name: Start minikube
4242
uses: medyagh/setup-minikube@latest

.github/workflows/pytest_odo.300.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ jobs:
3636

3737
steps:
3838
- name: Check out repository code
39-
uses: actions/checkout@v2
39+
uses: actions/checkout@v3
4040

4141
- name: Check out the latest odo repository code
42-
uses: actions/checkout@v2
42+
uses: actions/checkout@v3
4343
with:
4444
repository: redhat-developer/odo
4545
ref: main
@@ -51,7 +51,7 @@ jobs:
5151
- name: Setup go
5252
uses: actions/setup-go@v3
5353
with:
54-
go-version: '1.16.1'
54+
go-version: '1.17.3'
5555
- run: go version
5656

5757
# Build and installs odo from source code

scripts/openshiftci-presubmit-devfiles-odo-tests.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ git clone --depth=1 https://github.com/redhat-developer/odo $GOPATH/src/github.c
99
cp scripts/openshiftci-presubmit-devfiles-odo-tests.sh $GOPATH/src/github.com/redhat-developer/odo/scripts/
1010
cd $GOPATH/src/github.com/redhat-developer/odo
1111

12-
# temporarily disable problematic tests
13-
rm tests/integration/devfile/cmd_add_binding_test.go tests/integration/devfile/cmd_describe_list_binding_test.go tests/integration/devfile/cmd_dev_test.go
14-
1512
export CI="openshift"
1613
make configure-installer-tests-cluster
1714
make bin

tests/utils/config.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,18 @@ def use_test_registry_v300():
4040

4141
print('Check if', test_registry_name, 'exists and update URL if needed.')
4242

43-
result = subprocess.run(["odo", "preference", "registry", "list"],
43+
result = subprocess.run(["odo", "registry", "list"],
4444
capture_output=True, text=True, check=True)
4545

4646
if contains(result.stdout, test_registry_name):
47-
print('Updating', test_registry_name, '...')
48-
49-
subprocess.run(["odo", "preference", "registry", "update", test_registry_name, test_registry_url, '-f'],
50-
capture_output=True, text=True, check=True)
51-
else:
52-
print('Creating', test_registry_name, '...')
53-
subprocess.run(["odo", "preference", "registry", "add", test_registry_name, test_registry_url],
47+
print('Removing', test_registry_name, '...')
48+
subprocess.run(["odo", "preference", "remove", "registry", test_registry_name, "-f"],
5449
capture_output=True, text=True, check=True)
5550

51+
print('Adding', test_registry_name, '...')
52+
subprocess.run(["odo", "preference", "add", "registry", test_registry_name, test_registry_url],
53+
capture_output=True, text=True, check=True)
54+
5655
print('Using', test_registry_name, ':', test_registry_url)
5756

5857
yield test_registry_name

0 commit comments

Comments
 (0)