-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
upgrade command unit tests #2637
Comments
This change introduce a basic unit test for the `linkerd upgrade` command. Given a mock k8s client with linkerd-config and linkerd-identity-issuer objects, it validates the rendered yaml output against an expected file. To enable this testing, most of the logic in the top-level upgrade command has been moved down into a `validateAndBuild` method. TODO: - test individual functions around mutating options, flags, configs, and values - enable reading the install information from a manifest rather than k8s Part of #2637 Signed-off-by: Andrew Seigner <[email protected]>
This change introduce a basic unit test for the `linkerd upgrade` command. Given a mock k8s client with linkerd-config and linkerd-identity-issuer objects, it validates the rendered yaml output against an expected file. To enable this testing, most of the logic in the top-level upgrade command has been moved down into a `validateAndBuild` method. TODO: - test individual functions around mutating options, flags, configs, and values - enable reading the install information from a manifest rather than k8s Part of #2637 Signed-off-by: Andrew Seigner <[email protected]>
This change introduce a basic unit test for the `linkerd upgrade` command. Given a mock k8s client with linkerd-config and linkerd-identity-issuer objects, it validates the rendered yaml output against an expected file. To enable this testing, most of the logic in the top-level upgrade command has been moved down into a `validateAndBuild` method. TODO: - test individual functions around mutating options, flags, configs, and values - enable reading the install information from a manifest rather than k8s Part of #2637 Signed-off-by: Andrew Seigner <[email protected]>
This change introduce a basic unit test for the `linkerd upgrade` command. Given a mock k8s client with linkerd-config and linkerd-identity-issuer objects, it validates the rendered yaml output against an expected file. To enable this testing, most of the logic in the top-level upgrade command has been moved down into a `validateAndBuild` method. TODO: - test individual functions around mutating options, flags, configs, and values - enable reading the install information from a manifest rather than k8s Part of #2637 Signed-off-by: Andrew Seigner <[email protected]>
This change introduces a basic unit test for the `linkerd upgrade` command. Given a mock k8s client with linkerd-config and linkerd-identity-issuer objects, it validates the rendered yaml output against an expected file. To enable this testing, most of the logic in the top-level upgrade command has been moved down into a `validateAndBuild` method. TODO: - test individual functions around mutating options, flags, configs, and values - enable reading the install information from a manifest rather than k8s Part of #2637 Signed-off-by: Andrew Seigner <[email protected]>
This change introduces a basic unit test for the `linkerd upgrade` command. Given a mock k8s client with linkerd-config and linkerd-identity-issuer objects, it validates the rendered yaml output against an expected file. To enable this testing, most of the logic in the top-level upgrade command has been moved down into a `validateAndBuild` method. TODO: - test individual functions around mutating options, flags, configs, and values - enable reading the install information from a manifest rather than k8s Part of #2637 Signed-off-by: Andrew Seigner <[email protected]>
This change introduces a basic unit test for the `linkerd upgrade` command. Given a mock k8s client with linkerd-config and linkerd-identity-issuer objects, it validates the rendered yaml output against an expected file. To enable this testing, most of the logic in the top-level upgrade command has been moved down into a `validateAndBuild` method. TODO: - test individual functions around mutating options, flags, configs, and values - enable reading the install information from a manifest rather than k8s Part of linkerd#2637 Signed-off-by: Andrew Seigner <[email protected]> Signed-off-by: [email protected] <[email protected]>
This change introduces some unit tests on individual methods in the upgrade code path, along with some minor cleanup. Part of #2637 Signed-off-by: Andrew Seigner <[email protected]>
I think this is done now? @siggy ? |
@olix0r I have a branch that continues this work: https://github.com/linkerd/linkerd2/tree/siggy/update-upgrade-unit The goal of the initial PR, #2639, was to introduce unit tests but minimize implementation changes. Now that we have some basic unit testing, we have a bit more flexibility to move things around further, in service to testing. There's a bit more info in the checklist in #2459. |
This change introduces some unit tests on individual methods in the upgrade code path, along with some minor cleanup. Part of #2637 Signed-off-by: Andrew Seigner <[email protected]>
This change introduces some unit tests on individual methods in the upgrade code path, along with some minor cleanup. Part of #2637 Signed-off-by: Andrew Seigner <[email protected]>
This change introduces some unit tests on individual methods in the upgrade code path, along with some minor cleanup. Part of #2637 Signed-off-by: Andrew Seigner <[email protected]>
#2564 introduced the
linkerd upgrade
command, with most of the new code incli/cmd/upgrade.go
. Add unit tests for this.Note that
linkerd upgrade
tests could leverage functionality described in #2629, where upgrade information is read from a file rather than from Kubernetes.Part of #2459
The text was updated successfully, but these errors were encountered: