Skip to content

Commit

Permalink
Merge pull request #5649 from tstromberg/delete-wut
Browse files Browse the repository at this point in the history
Move delete --all test so that it is run in serial
  • Loading branch information
tstromberg authored Oct 17, 2019
2 parents f2ca6be + e008688 commit 8c7fb26
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
Empty file added test/integration/Untitled-1
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// a_download_only_test.go filename starts with a, for the purpose that it runs before all parallel tests and downloads the images and caches them.
package integration

import (
Expand All @@ -34,10 +33,7 @@ import (
"k8s.io/minikube/pkg/minikube/localpath"
)

// Note this test runs before all because filename is alphabetically first
// is used to cache images and binaries used by other parallel tests to avoid redownloading.
// TestDownloadOnly tests the --download-only option
func TestDownloadOnly(t *testing.T) {
func TestDownloadAndDeleteAll(t *testing.T) {
profile := UniqueProfileName("download")
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Minute)
defer Cleanup(t, profile, cancel)
Expand Down Expand Up @@ -79,5 +75,13 @@ func TestDownloadOnly(t *testing.T) {
}
})
}
// This is a weird place to test profile deletion, but this test is serial, and we have a profile to delete!
t.Run("DeleteAll", func(t *testing.T) {
rr, err := Run(t, exec.CommandContext(ctx, Target(), "delete", "--all"))
if err != nil {
t.Errorf("%s failed: %v", rr.Args, err)
}
})
})

}
5 changes: 0 additions & 5 deletions test/integration/start_stop_delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,6 @@ func TestStartStop(t *testing.T) {
if err != nil {
t.Errorf("%s failed: %v", rr.Args, err)
}

rr, err = Run(t, exec.CommandContext(ctx, Target(), "delete", "--all"))
if err != nil {
t.Errorf("%s failed: %v", rr.Args, err)
}
})
}
})
Expand Down

0 comments on commit 8c7fb26

Please sign in to comment.