Skip to content

Commit

Permalink
fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
tashima42 committed Sep 27, 2023
1 parent a5cc1fd commit 9ad4c4f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions cmd/rancher_release/list_images_rc.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func listImagesRCCommand() cli.Command {
func listImagesRC(c *cli.Context) error {
tag := c.String("tag")
logrus.Debug("tag: " + tag)

imagesRC, err := rancher.ListRancherImagesRC(tag)
if err != nil {
return err
Expand Down
2 changes: 0 additions & 2 deletions release/rancher/rancher.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,9 @@ func rancherImages(imagesURL string) (string, error) {
if resp.StatusCode != http.StatusOK {
return "", errors.New("failed to download rancher-images.txt file, expected status code 200, got: " + strconv.Itoa(resp.StatusCode))
}

images, err := io.ReadAll(resp.Body)
if err != nil {
return "", err
}

return string(images), nil
}
1 change: 0 additions & 1 deletion release/rancher/rancher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
func TestFindRCNonMirroredImages(t *testing.T) {
images := "rancher/pushprox-proxy:v0.1.0-rancher2-proxy\nrancher/rancher-agent:v2.7.6-rc5\nrancher/rancher-csp-adapter:v2.0.2\nrancher/rancher-webhook:v0.3.5\nrancher/rancher:v2.7.6-rc5\nrancher/mirrored-rke-tools:v0.1.88-rc3"
exptectedRCImages := []string{"rancher/rancher-agent:v2.7.6-rc5", "rancher/rancher:v2.7.6-rc5"}

result := nonMirroredRCImages(images)
if reflect.DeepEqual(exptectedRCImages, result) != true {
t.Errorf("failed: result images does not equal expected images, expected %+v, got %+v", exptectedRCImages, result)
Expand Down

0 comments on commit 9ad4c4f

Please sign in to comment.