Skip to content

Commit

Permalink
Run charm integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
orfeas-k committed Jan 15, 2024
1 parent 7ebad39 commit 1f07e76
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions persistenceagent/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ commands =
[testenv:integration]
passenv = *
allowlist_externals =
echo
bash
git
rm
Expand All @@ -58,16 +57,15 @@ deps =
pytest-operator
ops
commands =
echo "WARNING: This is a placeholder test - no test is implemented here."
; # clone related charm
; rm -rf {env:LOCAL_CHARM_DIR}
; git clone --branch {env:CHARM_BRANCH} {env:CHARM_REPO} {env:LOCAL_CHARM_DIR}
; # upload rock to docker and microk8s cache, replace charm's container with local rock reference
; bash -c 'NAME=$(yq eval .name rockcraft.yaml) && \
; VERSION=$(yq eval .version rockcraft.yaml) && \
; DOCKER_IMAGE=$NAME:$VERSION && \
; docker save $DOCKER_IMAGE > $DOCKER_IMAGE.tar && \
; sudo microk8s ctr image import $DOCKER_IMAGE.tar --digests=true && \
; yq e -i ".resources.oci-image.upstream-source=\"$DOCKER_IMAGE\"" {env:LOCAL_CHARM_DIR}/charms/kfp-persistence/metadata.yaml'
; # run bundle integration tests with rock
; tox -c {env:LOCAL_CHARM_DIR} -e bundle-integration-v2 -- --model kubeflow
# clone related charm
rm -rf {env:LOCAL_CHARM_DIR}
git clone --branch {env:CHARM_BRANCH} {env:CHARM_REPO} {env:LOCAL_CHARM_DIR}
# upload rock to docker and microk8s cache, replace charm's container with local rock reference
bash -c 'NAME=$(yq eval .name rockcraft.yaml) && \
VERSION=$(yq eval .version rockcraft.yaml) && \
DOCKER_IMAGE=$NAME:$VERSION && \
docker save $DOCKER_IMAGE > $DOCKER_IMAGE.tar && \
sudo microk8s ctr image import $DOCKER_IMAGE.tar --digests=true && \
yq e -i ".resources.oci-image.upstream-source=\"$DOCKER_IMAGE\"" {env:LOCAL_CHARM_DIR}/charms/kfp-persistence/metadata.yaml'
# run bundle integration tests with rock
tox -c {env:LOCAL_CHARM_DIR}/charms/kfp-persistence -e integration -- --model kubeflow

0 comments on commit 1f07e76

Please sign in to comment.