Skip to content

Commit

Permalink
Remove invalid test cases: empty dockerfiles are no longer allowed
Browse files Browse the repository at this point in the history
moby/buildkit#771 for more context.
  • Loading branch information
ingvagabund committed Jul 3, 2024
1 parent 8bccad2 commit aed9f3a
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions pkg/helpers/newapp/docker/dockerfile/dockerfile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,6 @@ func TestInsertInstructions(t *testing.T) {
newInstructions string
want string
}{
"insert nothing": {
original: `FROM busybox
ENV PATH=/bin
`,
index: 0,
newInstructions: ``,
want: `FROM busybox
ENV PATH=/bin
`,
},
"insert instruction in empty file": {
original: ``,
index: 0,
newInstructions: `FROM busybox`,
want: `FROM busybox
`,
},
"prepend single instruction": {
original: `FROM busybox
ENV PATH=/bin
Expand Down Expand Up @@ -180,10 +163,6 @@ func TestLastBaseImage(t *testing.T) {
in string
want string
}{
"empty Dockerfile": {
in: ``,
want: "",
},
"FROM missing argument": {
in: `FROM`,
want: "",
Expand Down Expand Up @@ -227,10 +206,6 @@ func TestBaseImages(t *testing.T) {
in string
want []string
}{
"empty Dockerfile": {
in: ``,
want: nil,
},
"FROM missing argument": {
in: `FROM`,
want: nil,
Expand Down Expand Up @@ -283,10 +258,6 @@ func TestLastExposedPorts(t *testing.T) {
in string
want []string
}{
"empty Dockerfile": {
in: ``,
want: nil,
},
"EXPOSE missing argument": {
in: `EXPOSE`,
want: nil,
Expand Down Expand Up @@ -343,10 +314,6 @@ func TestExposedPorts(t *testing.T) {
in string
want [][]string
}{
"empty Dockerfile": {
in: ``,
want: nil,
},
"EXPOSE missing argument": {
in: `EXPOSE`,
want: nil,
Expand Down

0 comments on commit aed9f3a

Please sign in to comment.