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

Re-organise folders structure #352

Open
Strech opened this issue Jan 7, 2022 · 2 comments
Open

Re-organise folders structure #352

Strech opened this issue Jan 7, 2022 · 2 comments

Comments

@Strech
Copy link
Contributor

Strech commented Jan 7, 2022

To follow best practices and allow us to have a better ability to test and develop new features, I would like to open discussion around packages reorganisation

toxiproxy/
├── bin/
├── cmd/
│   ├── cli/
│   │   └── main.go
│   ├── server/
│   │   └── main.go
│   └── dashboard
│       └── main.go
├── pkg/
│   ├── client/
│   │   └── ...
│   ├── server/
│   │   └── ...
│   ├── dashboard/
│   │   └── ...
│   └── toxics/
│   │   └── ...
│   └── stream/
│   │   └── ...
│   └── e2e/ (renamed `testing` see below)
│   │   └── ...
│   └── toxiproxytest/ (renamed `testhelper` see: https://pkg.go.dev/net/http/httptest)
│   │   └── ...
├── ...
└── README.md

Also I think it makes sense to restructure testing folder, since one of the files endpoint is used in Makefile to run e2e (maybe we just should rename it to be e2e/main.go) and benchmark_test.go is used only for benchmarking also in e2e tests.

@miry miry added this to the 3.0.0 milestone Jan 7, 2022
@Strech
Copy link
Contributor Author

Strech commented Jan 10, 2022

Another way to rearrange files around testing is to rename bin folder into test and move there testing folder too (inspiration https://github.com/kubernetes-sigs/descheduler/tree/master/test)

=== before

toxiptoxy/
├── bin/
│   ├── e2e
│   └── release_test
├── testing/
│   ├── benchmark_test.go
│   └── endpoint.go
...

=== after

toxiptoxy/
├── test/
│   ├── e2e/
│   │   ├── benchmark_test.go
│   │   └── endpoint.go
│   ├── run-e2e-tests
│   └── run-release-tests
...

@Strech
Copy link
Contributor Author

Strech commented Jan 10, 2022

Agreed structure for testing

toxiptoxy/
├── scripts/
│   ├── test-e2e
│   └── test-release
├── test/
│   ├── e2e/
│   │   ├── benchmark_test.go
│   │   └── endpoint.go
...

@miry miry modified the milestones: 3.0.0, 2.4.0 Jan 20, 2022
@miry miry removed this from the 3.0.0 milestone Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants