aus_driver_amazon_s3 icon indicating copy to clipboard operation
aus_driver_amazon_s3 copied to clipboard

Add first functional tests

Open cweiske opened this issue 1 year ago • 3 comments

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.

cweiske avatar Sep 06 '24 14:09 cweiske

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.

cweiske avatar Sep 09 '24 05:09 cweiske

The tests run!

cweiske avatar Sep 09 '24 11:09 cweiske

Thank you @cweiske I changed some of the scripts around the tests (minio setup) and others and would provide an other pullrequest you can take a look at and have an opionion about to get the best of both. With that i look forward to extend the functional tests a lot to cover most code in future.

weakbit avatar Oct 04 '24 07:10 weakbit

Ok, where is the new PR?

cweiske avatar Oct 14 '24 09:10 cweiske

@cweiske

I pushed it to https://github.com/andersundsehr/aus_driver_amazon_s3/tree/functional-tests-alternative the idea i had was to update to recent test scripts from the actual blog_example and to create the minio data on test runtime so its easier to change its content.

feel free to tell me if there are reasons not to do as i did.

weakbit avatar Oct 14 '24 10:10 weakbit

Did you change my commits? I don't see any commits of yours.

I used a set of predefined files in minio because that makes the test runs faster.

cweiske avatar Oct 14 '24 10:10 cweiske

@cweiske you are right. the commit did not succeed it is now added.

i hope i have some time soon to get things together and have a master merge

weakbit avatar Oct 14 '24 10:10 weakbit

@weakbit could you please merge the tests as they are, so that the other patches can use the tests as base?

I understand if you want to change things, but they do work as they are. If you don't have time to rework them now, merge my code and rework it later.

Having non-optimal tests now is better than perfect ones in 3 years.

cweiske avatar Dec 10 '24 09:12 cweiske

@cweiske thats right, could you please fix the conflict, then i will merge your PR

weakbit avatar Jan 16 '25 09:01 weakbit

I've rebased the patches.

cweiske avatar Jan 16 '25 16:01 cweiske

:tada:

cweiske avatar Jan 17 '25 07:01 cweiske