update local code for updated modules

Some tests had to be skipped as there's some issues to address, and
some of the result-types cannot be mocked / stubbed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-10-24 10:28:54 +02:00
parent aeb78091a0
commit 4f7c07cfc2
190 changed files with 3019 additions and 2584 deletions
+7 -5
View File
@@ -19,7 +19,7 @@ func (notFound) NotFound() {}
func TestValidateExternalNetworks(t *testing.T) {
testcases := []struct {
inspectResponse networktypes.Inspect
inspectResponse client.NetworkInspectResult
inspectError error
expectedMsg string
network string
@@ -45,9 +45,11 @@ func TestValidateExternalNetworks(t *testing.T) {
},
{
network: "user",
inspectResponse: networktypes.Inspect{
Network: networktypes.Network{
Scope: "swarm",
inspectResponse: client.NetworkInspectResult{
Network: networktypes.Inspect{
Network: networktypes.Network{
Scope: "swarm",
},
},
},
},
@@ -55,7 +57,7 @@ func TestValidateExternalNetworks(t *testing.T) {
for _, testcase := range testcases {
fakeAPIClient := &network.FakeClient{
NetworkInspectFunc: func(_ context.Context, _ string, _ client.NetworkInspectOptions) (networktypes.Inspect, error) {
NetworkInspectFunc: func(_ context.Context, _ string, _ client.NetworkInspectOptions) (client.NetworkInspectResult, error) {
return testcase.inspectResponse, testcase.inspectError
},
}