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

varlogtest: rich-featured toolkit for testing the Varlog #592

Closed
ijsong opened this issue Sep 25, 2023 · 0 comments · Fixed by #593
Closed

varlogtest: rich-featured toolkit for testing the Varlog #592

ijsong opened this issue Sep 25, 2023 · 0 comments · Fixed by #593

Comments

@ijsong
Copy link
Member

ijsong commented Sep 25, 2023

We are providing a very naive test toolkit called varlogtest. It doesn't execute server processes. Instead, it provides clients for varlog admin and log APIs. Even it has some unimplemented APIs.

We have to provide a more stable and complete toolkit for testing. It helps users develop their application with the Varlog rapidly. To renew the varlogtest package, we need to investigate other mature projects providing test helpers.

ijsong added a commit that referenced this issue Sep 25, 2023
This PR adds a validator to the AddLogStream API in the varlogtest.
Especially the validator checks the replicas requested. For example, if they have duplicate storage
nodes, their length is less than the replication factor, or they have unknown storage nodes.

Although the real varlogadm server's AddLogStream API is tested, the same thing in the varlogtest
package has not been tested, surprisingly. To fix it, all the implementations in the
`internal/admin` and `pkg/varlogtest` have to use the same test suite. However, it will lead to a
quite big refactoring. Therefore, this PR fixes the bug and adds some unit tests in the varlogtest
package.

Later we will revisit it to resolve #592.
ijsong added a commit that referenced this issue Sep 25, 2023
This PR adds a validator to the AddLogStream API in the varlogtest.
Especially the validator checks the replicas requested. For example, if they have duplicate storage
nodes, their length is less than the replication factor, or they have unknown storage nodes.

Although the real varlogadm server's AddLogStream API is tested, the same thing in the varlogtest
package has not been tested, surprisingly. To fix it, all the implementations in the
`internal/admin` and `pkg/varlogtest` have to use the same test suite. However, it will lead to a
quite big refactoring. Therefore, this PR fixes the bug and adds some unit tests in the varlogtest
package.

Later we will revisit it to resolve #592.
ijsong added a commit that referenced this issue Sep 26, 2023
This PR adds a validator to the AddLogStream API in the varlogtest.
Especially the validator checks the replicas requested. For example, if they have duplicate storage
nodes, their length is less than the replication factor, or they have unknown storage nodes.

Although the real varlogadm server's AddLogStream API is tested, the same thing in the varlogtest
package has not been tested, surprisingly. To fix it, all the implementations in the
`internal/admin` and `pkg/varlogtest` have to use the same test suite. However, it will lead to a
quite big refactoring. Therefore, this PR fixes the bug and adds some unit tests in the varlogtest
package.

Later we will revisit it to resolve #592.
ijsong added a commit that referenced this issue Oct 4, 2023
### What this PR does

This PR adds a validator to the AddLogStream API in the varlogtest.
Especially the validator checks the replicas requested. For example, if they
have duplicate storage nodes, their length is less than the replication factor,
or they have unknown storage nodes.

Although the real varlogadm server's AddLogStream API is tested, the same thing
in the varlogtest package has not been tested, surprisingly. To fix it, all the
implementations in the `internal/admin` and `pkg/varlogtest` have to use the
same test suite. However, it will lead to a quite big refactoring. Therefore,
this PR fixes the bug and adds some unit tests in the varlogtest package.

Later we will revisit it to resolve #592.
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 a pull request may close this issue.

1 participant