Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Commit ab1a8ef

Browse files
author
mr-pmillz
committed
fixed test struct
1 parent 7189e6b commit ab1a8ef

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

localio/localio_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,12 @@ func TestDownloadAndInstallLatestVersionOfGolang(t *testing.T) {
123123
if err != nil {
124124
t.Errorf("failed to create Directories type: %v", err)
125125
}
126-
pkgs, err := NewAptInstalled()
126+
installedPkgs := &InstalledPackages{}
127+
aptPackages, err := NewAptInstalled()
127128
if err != nil {
128129
t.Errorf("failed to get AptInstalledPackages: %v", err)
129130
}
131+
installedPkgs.AptInstalledPackages = aptPackages
130132
type args struct {
131133
homeDir string
132134
packages *InstalledPackages
@@ -136,7 +138,7 @@ func TestDownloadAndInstallLatestVersionOfGolang(t *testing.T) {
136138
args args
137139
wantErr bool
138140
}{
139-
{name: "TestDownloadAndInstallLatestVersionOfGolang 1", args: args{homeDir: dirs.HomeDir, packages: pkgs}, wantErr: false},
141+
{name: "TestDownloadAndInstallLatestVersionOfGolang 1", args: args{homeDir: dirs.HomeDir, packages: installedPkgs}, wantErr: false},
140142
}
141143
for _, tt := range tests {
142144
t.Run(tt.name, func(t *testing.T) {

0 commit comments

Comments
 (0)