Skip to content

Conversation

@ffjlabo
Copy link
Member

@ffjlabo ffjlabo commented Mar 10, 2022

What this PR does / why we need it:

This PR changes to output artifact versions for ecs development.

Which issue(s) this PR fixes:

A part of #3303

Does this PR introduce a user-facing change?:

NONE

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 32.47%. This pull request increases coverage by 0.06%.

File Function Base Head Diff
pkg/app/piped/cloudprovider/ecs/task.go FindArtifactVersions -- 83.33% +83.33%
pkg/app/piped/planner/ecs/ecs.go determineVersions -- 0.00% +0.00%
pkg/app/piped/cloudprovider/ecs/task.go parseContainerImage 0.00% 100.00% +100.00%
pkg/app/piped/planner/ecs/ecs.go Planner.Plan 0.00% 0.00% +0.00%

td, _ := parseTaskDefinition(tc.input)
versions, err := FindArtifactVersions(td)
assert.Equal(t, tc.expectedErr, err != nil)
assert.Equal(t, tc.expected, versions)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
assert.Equal(t, tc.expected, versions)
assert.ElementsMatch(t, tc.expected, versions)

should use this to avoid order of results while checking

},
}

for _, tc := range testcases {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for _, tc := range testcases {
for _, tc := range testcases {
tc := tc

}
}

func TestFindArtifactVersions(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.

Suggested change
func TestFindArtifactVersions(t *testing.T) {
func TestFindArtifactVersions(t *testing.T) {
t.Parallel()

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 32.48%. This pull request increases coverage by 0.08%.

File Function Base Head Diff
pkg/app/piped/cloudprovider/ecs/task.go FindArtifactVersions -- 100.00% +100.00%
pkg/app/piped/planner/ecs/ecs.go determineVersions -- 0.00% +0.00%
pkg/app/piped/planner/ecs/ecs.go Planner.Plan 0.00% 0.00% +0.00%
pkg/app/piped/cloudprovider/ecs/task.go parseContainerImage 0.00% 100.00% +100.00%

@nghialv
Copy link
Member

nghialv commented Mar 10, 2022

Great work.
/lgtm

@ffjlabo ffjlabo force-pushed the introduce_artifact_version_for_ecs branch from 674e335 to 4b32472 Compare March 10, 2022 06:54
@pipecd-bot pipecd-bot removed the lgtm label Mar 10, 2022
@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 32.48%. This pull request increases coverage by 0.08%.

File Function Base Head Diff
pkg/app/piped/cloudprovider/ecs/task.go FindArtifactVersions -- 100.00% +100.00%
pkg/app/piped/planner/ecs/ecs.go determineVersions -- 0.00% +0.00%
pkg/app/piped/cloudprovider/ecs/task.go parseContainerImage 0.00% 100.00% +100.00%
pkg/app/piped/planner/ecs/ecs.go Planner.Plan 0.00% 0.00% +0.00%

@knanao
Copy link
Member

knanao commented Mar 10, 2022

Nice catch
/approve

@pipecd-bot
Copy link
Collaborator

APPROVE

This pull request is APPROVED by knanao.

Approvers can cancel the approval by writing /approve cancel in a comment. Any additional commits also will change this pull request to be not-approved.

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.

6 participants