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

Test kit e2e #337

Merged
merged 34 commits into from
Jul 31, 2022
Merged

Test kit e2e #337

merged 34 commits into from
Jul 31, 2022

Conversation

Idokah
Copy link
Collaborator

@Idokah Idokah commented Jul 26, 2022

the structure changed as follows:
every library now includes tests/e2e-testkit directory that contains the docker-compose of each implementation
and the implementation resources with this interface:

interface IImplementationResources {
    initEnv(): Promise<void> - initialize database enviorment - run mock server/ docker-compse up
    shutdownEnv(): Promise<void> 
    setActive(): Promise<void> | void - set the enviorment variables
    cleanup(): Promise<void> | void   - delete all the schemas 
    supportedOperations: SchemaOperations[] - returns a list of supported operations
    name: string
}

There is new class E2EResources (TBD), that receives implementation resources, and the main function and provides all the needed methods for e2e tests.

You can see a usage to the test kit in #338 draft PR.

Important note about MongoDB:
To make MongoDB tests pass, a first step, you need to remove the previous MongoDB image and the volume init-mongo.js from Docker, since while the location of the docker-compose and volume have changed, as long as your local machine still has the previous image and volume, it won't update it, and you'll receive Unauthorized error.

@MXPOL
Copy link
Collaborator

MXPOL commented Jul 28, 2022

In addition, some of the docker compose files contain the networks section and some do not, why this inconsistency?

@MXPOL
Copy link
Collaborator

MXPOL commented Jul 28, 2022

Please add details about what must be done for the MongoDB's tests to run if the tests were run in the previous way

@Idokah
Copy link
Collaborator Author

Idokah commented Jul 28, 2022

In addition, some of the docker compose files contain the networks section and some do not, why this inconsistency?

fixed

@Idokah
Copy link
Collaborator Author

Idokah commented Jul 28, 2022

Please add details about what must be done for the MongoDB's tests to run if the tests were run in the previous way

done

@Idokah Idokah requested a review from MXPOL July 28, 2022 09:29
@Idokah Idokah merged commit ea64dc4 into master Jul 31, 2022
@Idokah Idokah deleted the test-kit-e2e branch July 31, 2022 11:59
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.

2 participants