Skip to content

Commit

Permalink
implement changes requested on review
Browse files Browse the repository at this point in the history
- replace `"` with `\`` quoted strings
- use closer helper function and move defer up
  • Loading branch information
nouseforaname authored and dlinsley committed Dec 10, 2024
1 parent 7b486c6 commit 7d35d89
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/commands/test_tile.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type TileTest struct {
Manifest bool ` long:"manifest" default:"false" description:"Focus the Manifest tests."`
Migrations bool ` long:"migrations" default:"false" description:"Focus the Migration tests."`
Stability bool ` long:"stability" default:"false" description:"Focus the Stability tests."`
ImagePath string " long:\"image-path\" "
ImagePath string ` long:"image-path" `
EnvironmentVars []string `short:"e" long:"environment-variable" description:"Pass environment variable to the test suites. For example --stability -e 'PRODUCT=srt'."`
GingkoFlags string ` long:"ginkgo-flags" default:"-r -p -slowSpecThreshold 15" description:"Flags to pass to the Ginkgo Manifest and Stability test suites."`
}
Expand Down
3 changes: 1 addition & 2 deletions internal/test/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,8 @@ func runTestWithSession(ctx context.Context, logger *log.Logger, w io.Writer, do
if err != nil {
return fmt.Errorf("failed to import image: %w", err)
}

defer closeAndIgnoreError(loadResponse.Body)
respBytes, err := io.ReadAll(loadResponse.Body)
defer loadResponse.Body.Close()
if err != nil {
return fmt.Errorf(`failed to parse load image response: %w`, err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/test/container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func Test_loadImage(t *testing.T) {

configuration := Configuration{
AbsoluteTileDirectory: absoluteTileDirectory,
ImagePath: `assets/alpine.tgz`,
ImagePath: "assets/alpine.tgz",
}

client := runTestWithSessionHelper(t, "", container.WaitResponse{
Expand Down

0 comments on commit 7d35d89

Please sign in to comment.