Open snez opened 3 years ago
Hi @snez. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.
Please, add a comment to assign the issue: @magento I am working on this
@snez The region is probably referring to CREDENTIAL_AWS_SECRETS_MANAGER_REGION in MFTF .env.example. You will need to set it only if:
Is it the case for you?
@jilu1 this issue happened at the initial MFTF setup phase before any tests were implemented, so no no AWS or _CREDS were used anywhere. It seems like a step is missing from the documentation setup steps regarding credentials.
I have the same problem @snez ! Could you solve this problem?
@sebastian-ehrling its been a while and can't remember but try creating an empty dev/tests/acceptance/.credentials file
create .credentials files an run the test with parameter -r solves the problem
I'm pretty sure I had a .credentials file before attempting to run a group, but using the "-r" (or "--remove") flag helped get around this issue.
This error is caused by having AWS S3 module enabled without the correct credentials.
It is missing these values from your dev/tests/acceptance/.env
REMOTE_STORAGE_AWSS3_REGION=us-west-2 REMOTE_STORAGE_AWSS3_BUCKET=my-test-bucket REMOTE_STORAGE_AWSS3_PREFIX=local
If you don't want to use AWS S3, just disable it. bin/magento module:disable Magento_AwsS3
Then regenerate your tests vendor/bin/mftf generate:tests -r
Finally tests works vendor/bin/codecept run functional -c dev/tests/acceptance/codeception.yml
I have a .credentials
file in my project but am still unable to run the tests. I do not want to use s3 nor do I have any tests using it. Trying to run my test suite fails:
$ vendor/bin/mftf run:group Company_Checkout -r -f
ERROR: 1 Suite(s) has(have) tests with annotation errors or some included tests missing. See mftf.log for details.
ERROR: 9 Test(s) failed to generate. See mftf.log for details.
Generate Tests Command Run (with errors)
Codeception PHP Testing Framework v4.1.28
Powered by PHPUnit 9.1.5 by Sebastian Bergmann and contributors.
[Groups] Company_Checkout
In ClientResolver.php line 412:
[InvalidArgumentException]
Invalid configuration value provided for "region". Expected string, but got
bool(false)
region: (string)
Region to connect to. See
http://docs.aws.amazon.com/general/latest/gr/rande.html for a list of
available regions.
I've been trying to get this to work since a few days now. The dev experience so far is even worse than with normal magento development and I haven't really written any tests yet.
Can't just disable bin/magento module:disable Magento_AwsS3
anymore, it's now a dependant module of Magento_Catalog.
Unable to change status of modules because of the following constraints:
Cannot disable Magento_AwsS3 because modules depend on it:
(...)
Magento_Catalog: Magento_Catalog->Magento_AwsS3
You can remove that module if you add to composer.json:
"replace": {
"magento/module-aws-s3": "*"
},
and then run: composer remove magento/module-aws-s3
Preconditions
Steps to reproduce
Expected result
Actual result
Notes
In the file under dev/tests/acceptance/.env, I have the following:
In the file under dev/tests/acceptance/.credentials, I have the same entries as in .credentials.example