Skip to content

Commit 5efe707

Browse files
Fixed unit tests
1 parent f8d3700 commit 5efe707

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

pkg/asset/agent/gencrypto/authconfig_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import (
44
"testing"
55

66
"github.com/stretchr/testify/assert"
7+
8+
"github.com/openshift/installer/pkg/asset"
9+
"github.com/openshift/installer/pkg/asset/agent/common"
710
)
811

912
func TestAuthConfig_Generate(t *testing.T) {
@@ -16,8 +19,11 @@ func TestAuthConfig_Generate(t *testing.T) {
1619
}
1720
for _, tc := range cases {
1821
t.Run(tc.name, func(t *testing.T) {
22+
parents := asset.Parents{}
23+
parents.Add(&common.InfraEnvID{})
24+
1925
authConfigAsset := &AuthConfig{}
20-
err := authConfigAsset.Generate(nil)
26+
err := authConfigAsset.Generate(parents)
2127

2228
assert.NoError(t, err)
2329

pkg/asset/agent/image/ignition_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
hivev1 "github.com/openshift/hive/apis/hive/v1"
2222
"github.com/openshift/installer/pkg/asset"
2323
"github.com/openshift/installer/pkg/asset/agent/agentconfig"
24+
"github.com/openshift/installer/pkg/asset/agent/common"
2425
"github.com/openshift/installer/pkg/asset/agent/gencrypto"
2526
"github.com/openshift/installer/pkg/asset/agent/joiner"
2627
"github.com/openshift/installer/pkg/asset/agent/manifests"
@@ -670,6 +671,7 @@ func buildIgnitionAssetDefaultDependencies(t *testing.T) []asset.Asset {
670671
&tls.AdminKubeConfigSignerCertKey{},
671672
&tls.AdminKubeConfigClientCertKey{},
672673
&gencrypto.AuthConfig{},
674+
&common.InfraEnvID{},
673675
}
674676
}
675677

pkg/asset/agent/image/unconfigured_ignition_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"github.com/openshift/assisted-service/models"
1212
hivev1 "github.com/openshift/hive/apis/hive/v1"
1313
"github.com/openshift/installer/pkg/asset"
14+
"github.com/openshift/installer/pkg/asset/agent/common"
1415
"github.com/openshift/installer/pkg/asset/agent/manifests"
1516
"github.com/openshift/installer/pkg/asset/agent/mirror"
1617
)
@@ -115,6 +116,7 @@ func buildUnconfiguredIgnitionAssetDefaultDependencies(t *testing.T) []asset.Ass
115116
&manifests.NMStateConfig{},
116117
&mirror.RegistriesConf{},
117118
&mirror.CaBundle{},
119+
&common.InfraEnvID{},
118120
}
119121
}
120122

0 commit comments

Comments
 (0)