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

Scaffolding for integration tests #1113

Merged
merged 3 commits into from
Oct 29, 2020
Merged
Show file tree
Hide file tree
Changes from 2 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
24 changes: 24 additions & 0 deletions .prow/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,30 @@ presubmits:
- image: golang:1.13
command: ["infra/scripts/test-golang-sdk.sh"]

- name: python-sdk-integration-test
decorate: true
always_run: true
spec:
containers:
- image: gcr.io/kf-feast/feast-ci:latest
command: ["infra/scripts/test-integration.sh"]
resources:
requests:
cpu: "1"
memory: "3072Mi"
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /etc/gcloud/service-account.json
volumeMounts:
- mountPath: /etc/gcloud/service-account.json
name: service-account
readOnly: true
subPath: service-account.json
volumes:
- name: service-account
secret:
secretName: feast-service-account

- name: test-end-to-end
decorate: true
always_run: true
Expand Down
7 changes: 7 additions & 0 deletions infra/scripts/test-integration.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

python -m pip install --upgrade pip setuptools wheel
make install-python
python -m pip install -qr tests/requirements.txt

pytest tests/integration/
Empty file added tests/integration/__init__.py
Empty file.
12 changes: 12 additions & 0 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import pytest


def pytest_addoption(parser):
pass


def pytest_runtest_setup(item):
if "incremental" in item.keywords:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't use this keyword anymore

previousfailed = getattr(item.parent, "_previousfailed", None)
if previousfailed is not None:
pytest.xfail("previous test failed (%s)" % previousfailed.name)