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

Port some 0.8.7 alloc runner tests #5349

Merged
merged 9 commits into from
Feb 22, 2019
Merged

Port some 0.8.7 alloc runner tests #5349

merged 9 commits into from
Feb 22, 2019

Conversation

notnoop
Copy link
Contributor

@notnoop notnoop commented Feb 21, 2019

No description provided.

@notnoop notnoop force-pushed the port-tests-20190221 branch 3 times, most recently from 04dca99 to 80d2396 Compare February 21, 2019 20:22
// TestAllocRuner_HandlesArtifactFailure ensures that if one task in a task group is
// retrying fetching an artifact, other tasks in the group should be able
// to proceed.
func TestAllocRunner_HandlesArtifactFailure(t *testing.T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed the test name from TestAllocRunner_RetryArtifact as we never tested that artifacts downloading get retried.

client/allocrunner/alloc_runner_test.go Outdated Show resolved Hide resolved
@notnoop notnoop requested a review from schmichael February 22, 2019 02:24
@notnoop notnoop force-pushed the port-tests-20190221 branch 2 times, most recently from 0c89ec8 to 138b30f Compare February 22, 2019 14:22
Copy link
Member

@schmichael schmichael left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for porting so many. I know it's not exciting work. Core test logic all looks great.

client/allocrunner/alloc_runner_test.go Outdated Show resolved Hide resolved
client/allocrunner/alloc_runner_test.go Outdated Show resolved Hide resolved
client/allocrunner/alloc_runner_test.go Show resolved Hide resolved
client/allocrunner/alloc_runner_test.go Outdated Show resolved Hide resolved
client/allocrunner/alloc_runner_test.go Outdated Show resolved Hide resolved
require.NoErrorf(t, err, "%v not rendered", f2)
}

func TestTaskRunner_Template_NewVaultToken(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

I've read the test twice and am still not positive what a good 1 line description would be 😬

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Your guess is as good as mine - I'm guessing that it's testing that when using consul templates, a new token is derived that gets revoked after alloc terminates?

I don't quite understand the EmbeddedTmpl value; but I'm guessing it's an arbitrary value to trigger vault token creation.

client/allocrunner/taskrunner/task_runner_test.go Outdated Show resolved Hide resolved
client/allocrunner/taskrunner/task_runner_test.go Outdated Show resolved Hide resolved
client/allocrunner/taskrunner/task_runner_test.go Outdated Show resolved Hide resolved
client/allocrunner/taskrunner/task_runner_test.go Outdated Show resolved Hide resolved
@notnoop notnoop force-pushed the port-tests-20190221 branch from bf5e73f to e1e5053 Compare February 22, 2019 20:56
@notnoop
Copy link
Contributor Author

notnoop commented Feb 22, 2019

@schmichael this is ready for another review now - I rebased and it's green.

@notnoop notnoop merged commit eecae58 into master Feb 22, 2019
@notnoop notnoop deleted the port-tests-20190221 branch February 25, 2019 01:36
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants