Skip to content

Commit

Permalink
NO-ISSUE: update vendor and mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
eifrach committed Dec 25, 2024
1 parent d0cf7b5 commit df68ea1
Show file tree
Hide file tree
Showing 894 changed files with 2,611 additions and 5,409 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ subsystem/logs
.project
subsystem/data/*.leases*
*.log
**/junit_unit_test.xml
2 changes: 1 addition & 1 deletion Dockerfile.assisted_installer_agent-build
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/i
go install golang.org/x/tools/cmd/[email protected] && \
go install github.com/onsi/ginkgo/[email protected] && \
go install github.com/golang/mock/[email protected] && \
go install github.com/vektra/mockery/v2@v2.9.6 && \
go install github.com/vektra/mockery/v2@v2.39.2 && \
go install gotest.tools/[email protected] && \
go install github.com/axw/gocov/[email protected] && \
go install github.com/AlekSi/[email protected]
Expand Down
15 changes: 9 additions & 6 deletions pkg/journalLogger/mock_IJournalWriter.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion src/connectivity_check/connectivity_check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ var _ = Describe("check host parallel validation", func() {
It(t.name, func() {
d := setupDispather(t.simulateL2IPConflict, t.success, t.hosts.Nics)
ret, err := d.Run(models.ConnectivityCheckParams{t.hosts}, funk.Map(t.nics, func(s string) OutgoingNic {
return OutgoingNic{Name: s, HasIpv4Addresses: true, HasIpv6Addresses: true}
return OutgoingNic{Name: s, HasIpv4Addresses: true, HasIpv6Addresses: true, Addresses: getAddr("192.168.1.133", 24)}
}).([]OutgoingNic))
Expect(err).ToNot(HaveOccurred())
Expect(ret.RemoteHosts).To(HaveLen(1))
Expand Down Expand Up @@ -346,3 +346,13 @@ func TestConnectivityCheck(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "connectivity check tests")
}

func getAddr(addr string, mask int) []net.Addr {
localIP := net.ParseIP(addr)
localMask := net.CIDRMask(mask, 32)

return []net.Addr{&net.IPNet{
IP: localIP,
Mask: localMask,
}}
}
8 changes: 4 additions & 4 deletions src/connectivity_check/ipv4_arping_checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Received 0 response(s)
attributes := Attributes{
RemoteIPAddress: remoteIPAddress,
RemoteMACAddress: remoteMACAddress,
OutgoingNIC: OutgoingNic{Name: outgoingNIC, HasIpv4Addresses: true},
OutgoingNIC: OutgoingNic{Name: outgoingNIC, HasIpv4Addresses: true, Addresses: getAddr(outgoingIPAddress, 24)},
RemoteMACAddresses: remoteMACAddresses,
}
mockFullReply(remoteIPAddress, remoteMACAddress)
Expand Down Expand Up @@ -84,7 +84,7 @@ Received 0 response(s)
attributes := Attributes{
RemoteIPAddress: remoteIPAddress,
RemoteMACAddress: remoteMACAddress,
OutgoingNIC: OutgoingNic{Name: outgoingNIC, HasIpv4Addresses: true},
OutgoingNIC: OutgoingNic{Name: outgoingNIC, HasIpv4Addresses: true, Addresses: getAddr(outgoingIPAddress, 24)},
RemoteMACAddresses: remoteMACAddresses,
}
mockFullReply(remoteIPAddress, secondaryMACAddress)
Expand All @@ -103,7 +103,7 @@ Received 0 response(s)
attributes := Attributes{
RemoteIPAddress: remoteIPAddress,
RemoteMACAddress: remoteMACAddress,
OutgoingNIC: OutgoingNic{Name: outgoingNIC, HasIpv4Addresses: true},
OutgoingNIC: OutgoingNic{Name: outgoingNIC, HasIpv4Addresses: true, Addresses: getAddr(outgoingIPAddress, 24)},
RemoteMACAddresses: remoteMACAddresses,
}
mockFullReply(remoteIPAddress, additionalMACAddress)
Expand All @@ -122,7 +122,7 @@ Received 0 response(s)
attributes := Attributes{
RemoteIPAddress: remoteIPAddress,
RemoteMACAddress: remoteMACAddress,
OutgoingNIC: OutgoingNic{Name: outgoingNIC, HasIpv4Addresses: true},
OutgoingNIC: OutgoingNic{Name: outgoingNIC, HasIpv4Addresses: true, Addresses: getAddr(outgoingIPAddress, 24)},
RemoteMACAddresses: remoteMACAddresses,
}
mockEmptyReply(remoteIPAddress)
Expand Down
19 changes: 13 additions & 6 deletions src/connectivity_check/mock_Checker.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 13 additions & 7 deletions src/connectivity_check/mock_Executer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions src/connectivity_check/mock_ResultReporter.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit df68ea1

Please sign in to comment.