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

Add first functional tests #153

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

cweiske
Copy link
Contributor

@cweiske cweiske commented Sep 6, 2024

This adds the first functional tests for aus_driver_amazon_s3.

The tests are run against a local MinIO instance that is started with the container that the tests are run in.

A prepared test-bucket is provided that MinIO can use without initial setup, which keeps test setup time low and keeps dependencies at minimum.

Some of the tests are marked skipped because they exhibit bugs that get fixed with #147.

The functional tests do not yet get automatically run on github actions since I don't know how to do that properly.

I run the tests locally with

time ./Build/Scripts/runTests.sh -p 8.2 -d sqlite -s functional -e "--display-warnings --display-notices --display-errors"

and they complete in 3 seconds.

The XDEBUG variables defined in the docker-compose.yml file command
blocks were not used under docker 20.10.24+dfsg1
with docker compose version v2.29.2.

This led to the problem that Bootstrap::init took 37 seconds,
wasting developer time.

By switching to "export" calls, the variables get set properly
and php/xdebug runs fast. A single functional test run is 3 seconds now.
based on the files in Tests/Functional/Bucketfiles/
Created with the Build/testing-docker/prepare-minio-data.sh

Committed here so that "mc" (minio client) is not needed
to run the tests.
./Build/Scripts/runTests.sh -p 8.2 -d sqlite -s functional -e "--display-warnings --display-notices --display-errors"
We use a local minio instance to run the tests against.

Run them with
./Build/Scripts/runTests.sh -p 8.2 -d sqlite -s functional -e "--display-warnings --display-notices --display-errors"
@cweiske
Copy link
Contributor Author

cweiske commented Sep 9, 2024

I've added the functional tests to the github actions file, but they do not run automatically:

This scheduled workflow is disabled because there hasn't been activity in this repository for at least 60 days. Enable this workflow to resume scheduled runs.

- amend commit to trigger build
ubuntu-20.04 brings an error:
> Run Build/Scripts/runTests.sh -p 8.0 -s composerInstall
> Build/Scripts/runTests.sh: line 107: type: docker-compose: not found
> This script relies on docker and docker-compose. Please install
.. typo3/testing-framework 8 needs a higher version
@cweiske
Copy link
Contributor Author

cweiske commented Sep 9, 2024

The tests run!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant