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

symlink: drop go 1.13, and use testing.Cleanup() #55

Merged
merged 1 commit into from
Feb 25, 2021

Conversation

thaJeztah
Copy link
Member

Cleanup was added in Go 1.14, so we need to drop go 1.13 for this.

@thaJeztah
Copy link
Member Author

relates to #54 (comment)

/cc @kolyshkin

@@ -53,8 +53,8 @@ func testSymlink(tmpdir, path, expected, scope string) error {
}

func TestFollowSymlinkAbsolute(t *testing.T) {
tmpdir, cleanup := mkTempDir(t)
defer cleanup()
tmpdir := mkTempDir(t)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why don't we use t.TempDir() here? https://golang.org/pkg/testing/#T.TempDir

Ahh, this is because they are only supported since 1.15, so we need to wait at least until 1.14 is no longer supported.

Makes sense to add a TODO maybe?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, yes, can add a TODO

(didn't know about the t.TempDir() until you mentioned it recently. I should catch up more on new features 😂)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can't use this shiny new t.TempDir() anyway until 1.14 goes out of fashion...

Cleanup was added in Go 1.14, so we need to drop go 1.13
for this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Copy link
Collaborator

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

LGTM except for a missing TODO

Copy link
Collaborator

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

LGTM

@kolyshkin
Copy link
Collaborator

@cpuguy83 PTAL

1 similar comment
@kolyshkin
Copy link
Collaborator

@cpuguy83 PTAL

Copy link
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

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

LGTM

@cpuguy83 cpuguy83 merged commit 4836a5f into moby:master Feb 25, 2021
@thaJeztah thaJeztah deleted the simplify_utils branch February 25, 2021 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants