-
Notifications
You must be signed in to change notification settings - Fork 707
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(graphql): fix broken tests for
chaoscenter/graphql/server
and …
…integrate mockery to generate mocks (#4372) * chore: add mockery Signed-off-by: smit thakkar <[email protected]> * chore: generate mocks Signed-off-by: smit thakkar <[email protected]> * test: fix broken tests Signed-off-by: smit thakkar <[email protected]> * docs: add instructions for generating mocks Signed-off-by: smit thakkar <[email protected]> * style: fix formatting on docs Signed-off-by: smit thakkar <[email protected]> * refactor: make mock initialisation dry and remove unused mocks Signed-off-by: smit thakkar <[email protected]> * style: fix lint errors Signed-off-by: smit thakkar <[email protected]> * style: fix lint errors Signed-off-by: smit thakkar <[email protected]> * style: fix lint errors Signed-off-by: smit thakkar <[email protected]> --------- Signed-off-by: smit thakkar <[email protected]>
- Loading branch information
1 parent
7a57192
commit 52593fb
Showing
7 changed files
with
692 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
with-expecter: true | ||
packages: | ||
github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/chaos_experiment/ops: | ||
interfaces: | ||
Service: | ||
# Modify package-level config for this specific interface (if applicable) | ||
config: | ||
dir: "pkg/chaos_experiment/model/mocks" | ||
filename: "service.go" | ||
mockname: ChaosExperimentService | ||
outpkg: mocks | ||
github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/chaos_experiment_run: | ||
interfaces: | ||
Service: | ||
# Modify package-level config for this specific interface (if applicable) | ||
config: | ||
dir: "pkg/chaos_experiment_run/model/mocks" | ||
filename: "service.go" | ||
mockname: ChaosExperimentRunService | ||
outpkg: mocks |
320 changes: 140 additions & 180 deletions
320
chaoscenter/graphql/server/pkg/chaos_experiment/handler/handler_test.go
Large diffs are not rendered by default.
Oops, something went wrong.
335 changes: 317 additions & 18 deletions
335
chaoscenter/graphql/server/pkg/chaos_experiment/model/mocks/service.go
Large diffs are not rendered by default.
Oops, something went wrong.
211 changes: 195 additions & 16 deletions
211
chaoscenter/graphql/server/pkg/chaos_experiment_run/model/mocks/service.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters