Skip to content

OCPBUGS-57535: vSphere - remove unit tests using nip.io #9793

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 3 additions & 47 deletions pkg/asset/installconfig/vsphere/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ const (
tagTestAttachZoneOnHostsTags = 0x40
)

const wildcardDNS = "nip.io"

func validIPIInstallConfig() *types.InstallConfig {
return &types.InstallConfig{
Networking: &types.Networking{
Expand Down Expand Up @@ -630,19 +628,7 @@ func Test_ensureDNS(t *testing.T) {
name string
installConfig *types.InstallConfig
expectErr string
}{
{
name: "valid dns",
installConfig: func() *types.InstallConfig {
installConfig := validIPIInstallConfig()
installConfig.ObjectMeta.Name = "0a000803"
installConfig.BaseDomain = wildcardDNS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can remove:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed


return installConfig
}(),
expectErr: ``,
},
}
}{}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
err := ensureDNS(test.installConfig, platformFieldPath, resolver).ToAggregate()
Expand Down Expand Up @@ -707,38 +693,8 @@ func Test_ensureLoadBalancer(t *testing.T) {
stopTCPListen bool
expectLevel string
expectWarn string
}{
{
name: "valid lb",
installConfig: func() *types.InstallConfig {
installConfig := validIPIInstallConfig()
installConfig.ObjectMeta.Name = "7f000001"
installConfig.BaseDomain = wildcardDNS
installConfig.VSphere.APIVIPs = []string{}
installConfig.VSphere.IngressVIPs = []string{}

return installConfig
}(),
stopTCPListen: false,
expectLevel: ``,
expectWarn: ``,
},
{
name: "warn lb",
installConfig: func() *types.InstallConfig {
installConfig := validIPIInstallConfig()
installConfig.ObjectMeta.Name = "7f000002"
installConfig.BaseDomain = wildcardDNS
installConfig.VSphere.APIVIPs = []string{}
installConfig.VSphere.IngressVIPs = []string{}

return installConfig
}(),
stopTCPListen: true,
expectLevel: `warning`,
expectWarn: `Installation may fail, load balancer not available: dial tcp 127.0.0.2:6443: connect: connection refused`,
},
}
}{}

for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
if test.stopTCPListen {
Expand Down