Skip to content

Integration test for the 'upgrade' command#2679

Merged
ihcsim merged 3 commits intomasterfrom
isim/upgrade-integration-test
Apr 12, 2019
Merged

Integration test for the 'upgrade' command#2679
ihcsim merged 3 commits intomasterfrom
isim/upgrade-integration-test

Conversation

@ihcsim
Copy link
Contributor

@ihcsim ihcsim commented Apr 10, 2019

The extra steps to download and install an edge release increases the test duration by less than a minute, on my machine:

This branch:

=== PASS: all tests passed
bin/test-run `pwd`/bin/linkerd  33.16s user 4.85s system 9% cpu 6:33.27 total

master:

=== PASS: all tests passed
bin/test-run `pwd`/bin/linkerd  35.64s user 5.46s system 11% cpu 5:52.69 total

Fixes #2669

Signed-off-by: Ivan Sim [email protected]

@ihcsim ihcsim requested a review from siggy April 10, 2019 03:09
@l5d-bot
Copy link
Collaborator

l5d-bot commented Apr 10, 2019

@ihcsim ihcsim force-pushed the isim/upgrade-integration-test branch from 377073a to 71e1c67 Compare April 10, 2019 03:46
@l5d-bot
Copy link
Collaborator

l5d-bot commented Apr 10, 2019

@ihcsim ihcsim force-pushed the isim/upgrade-integration-test branch from 71e1c67 to 17a1a55 Compare April 10, 2019 04:07
@l5d-bot
Copy link
Collaborator

l5d-bot commented Apr 10, 2019

@ihcsim ihcsim force-pushed the isim/upgrade-integration-test branch from 17a1a55 to c4f4715 Compare April 10, 2019 05:41
@l5d-bot
Copy link
Collaborator

l5d-bot commented Apr 10, 2019

@ihcsim ihcsim force-pushed the isim/upgrade-integration-test branch 4 times, most recently from dc6475f to 40917f9 Compare April 10, 2019 06:47
@l5d-bot
Copy link
Collaborator

l5d-bot commented Apr 10, 2019

@ihcsim ihcsim force-pushed the isim/upgrade-integration-test branch from 40917f9 to 304d15b Compare April 10, 2019 15:45
@l5d-bot
Copy link
Collaborator

l5d-bot commented Apr 10, 2019

@ihcsim ihcsim force-pushed the isim/upgrade-integration-test branch from 304d15b to 5252609 Compare April 10, 2019 16:49
@l5d-bot
Copy link
Collaborator

l5d-bot commented Apr 10, 2019

@ihcsim ihcsim force-pushed the isim/upgrade-integration-test branch from 5252609 to b488ed8 Compare April 10, 2019 17:10
@l5d-bot
Copy link
Collaborator

l5d-bot commented Apr 10, 2019

Copy link
Member

@siggy siggy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome!

had a couple comments around the --proxy-auto-inject flag, but overall this looks (and works) great!

=== PASS: all tests passed

@ihcsim ihcsim force-pushed the isim/upgrade-integration-test branch from b488ed8 to dfd72aa Compare April 11, 2019 04:35
printf "Running test [%s] %s\\n" "$(basename "$1")" "$2"
go test -v "$1" --linkerd="$linkerd_path" --linkerd-namespace="$linkerd_namespace" --k8s-context="$k8s_context" --integration-tests "$2"
filename="$1"
shift
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's like args[1:].

shift

printf "Running test [%s] %s\\n" "$(basename "$filename")" "$@"
go test -v "$filename" --linkerd="$linkerd_path" --k8s-context="$k8s_context" --integration-tests "$@"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced the "$2" with "$@", because the former converts multiple arguments into one long, space-delimited argument. For example, when running run_test filename --linkerd-namespace=linkerd --proxy-auto-inject, the testutil.TestHelper ends up treating the linkerd namespace as linkerd --proxy-auto-inject.

Copy link
Contributor Author

@ihcsim ihcsim Apr 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, removed the --linkerd-namespace="$linkerd_namespace" argument. This should be part of $@, instead of relying on the global $linkerd_namespace variable. This was problematic for upgrade and auto-inject test cases which depend on the control plane in a different namespace.

@l5d-bot
Copy link
Collaborator

l5d-bot commented Apr 11, 2019

@ihcsim ihcsim force-pushed the isim/upgrade-integration-test branch from dfd72aa to cd843e1 Compare April 11, 2019 18:30
@l5d-bot
Copy link
Collaborator

l5d-bot commented Apr 11, 2019

Copy link
Member

@siggy siggy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! one more nit then 🚢 👍

Ivan Sim added 2 commits April 11, 2019 14:24
@ihcsim ihcsim force-pushed the isim/upgrade-integration-test branch from cd843e1 to bcf9ff4 Compare April 11, 2019 21:54
@l5d-bot
Copy link
Collaborator

l5d-bot commented Apr 11, 2019

@ihcsim ihcsim merged commit 1c0f147 into master Apr 12, 2019
@ihcsim ihcsim deleted the isim/upgrade-integration-test branch April 12, 2019 02:37
siggy added a commit that referenced this pull request May 20, 2019
In #2679 we introduced an upgrade integration test. At the time we only
supported upgrading from a recent edge. Since that PR, a stable build
was released supporting upgrade.

Modify the upgrade integration test to upgrade from the latest stable
rather than latest edge. This fulfills the original intent of #2669.

Also add some known k8s event warnings.

Signed-off-by: Andrew Seigner <[email protected]>
siggy added a commit that referenced this pull request May 20, 2019
In #2679 we introduced an upgrade integration test. At the time we only
supported upgrading from a recent edge. Since that PR, a stable build
was released supporting upgrade.

Modify the upgrade integration test to upgrade from the latest stable
rather than latest edge. This fulfills the original intent of #2669.

Also add some known k8s event warnings.

Signed-off-by: Andrew Seigner <[email protected]>
ihcsim pushed a commit that referenced this pull request May 20, 2019
In #2679 we introduced an upgrade integration test. At the time we only
supported upgrading from a recent edge. Since that PR, a stable build
was released supporting upgrade.

Modify the upgrade integration test to upgrade from the latest stable
rather than latest edge. This fulfills the original intent of #2669.

Also add some known k8s event warnings.

Signed-off-by: Andrew Seigner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

upgrade integration tests

3 participants