From 9b626176b05dddeb0f6b76f67f1e6e61a6e34c4c Mon Sep 17 00:00:00 2001 From: Ales Stimec Date: Mon, 9 Dec 2024 11:23:35 +0100 Subject: [PATCH 1/4] chore(go.mod): update juju dependency to 3.6.0 Updates juju dependency to 3.6.0. --- go.mod | 34 +-- go.sum | 78 +++--- internal/juju/jujuapi_mock_test.go | 41 +-- internal/juju/machines.go | 5 +- internal/juju/mock_test.go | 406 +++++++++++++++-------------- 5 files changed, 289 insertions(+), 275 deletions(-) diff --git a/go.mod b/go.mod index d88cdd4e..750c85c6 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,14 @@ module github.com/juju/terraform-provider-juju -go 1.21 +go 1.23 + +toolchain go1.23.4 require ( github.com/bflad/tfproviderlint v0.30.0 github.com/hashicorp/terraform-plugin-docs v0.19.4 - // v3.5.3 - github.com/juju/juju v0.0.0-20240724081236-63d460f9ee6c + // v3.6.0 + github.com/juju/juju v0.0.0-20241125225906-6dec77a01480 ) @@ -31,7 +33,7 @@ require ( github.com/juju/version/v2 v2.0.1 github.com/rs/zerolog v1.33.0 github.com/stretchr/testify v1.9.0 - go.uber.org/mock v0.4.0 + go.uber.org/mock v0.5.0 gopkg.in/httprequest.v1 v1.2.1 gopkg.in/macaroon.v2 v2.1.0 gopkg.in/yaml.v2 v2.4.0 @@ -89,7 +91,7 @@ require ( github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/gorilla/websocket v1.5.1 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/hashicorp/cli v1.1.6 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-checkpoint v0.5.0 // indirect @@ -116,7 +118,7 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/juju/ansiterm v1.0.0 // indirect github.com/juju/blobstore/v3 v3.0.2 // indirect - github.com/juju/description/v5 v5.0.4 // indirect + github.com/juju/description/v7 v7.0.2 // indirect github.com/juju/featureflag v1.0.0 // indirect github.com/juju/gnuflag v1.0.0 // indirect github.com/juju/go4 v0.0.0-20160222163258-40d72ab9641a // indirect @@ -199,17 +201,17 @@ require ( github.com/yuin/goldmark-meta v1.1.0 // indirect github.com/zclconf/go-cty v1.15.0 // indirect go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect - golang.org/x/crypto v0.26.0 // indirect + golang.org/x/crypto v0.30.0 // indirect golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect - golang.org/x/mod v0.19.0 // indirect - golang.org/x/net v0.27.0 // indirect - golang.org/x/oauth2 v0.21.0 // indirect - golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.23.0 // indirect - golang.org/x/term v0.23.0 // indirect - golang.org/x/text v0.17.0 // indirect - golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.23.0 // indirect + golang.org/x/mod v0.22.0 // indirect + golang.org/x/net v0.32.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/term v0.27.0 // indirect + golang.org/x/text v0.21.0 // indirect + golang.org/x/time v0.7.0 // indirect + golang.org/x/tools v0.28.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/grpc v1.63.2 // indirect diff --git a/go.sum b/go.sum index 90ae0439..e1993619 100644 --- a/go.sum +++ b/go.sum @@ -1,18 +1,20 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 h1:E+OJmp2tPvt1W+amx48v1eqbjDYsgN+RzP4q16yV5eM= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1/go.mod h1:a6xsAQUZg+VsS3TJ05SRp524Hs4pZ/AeFSr5ENf0Yjo= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 h1:FDif4R1+UUR+00q6wquyX90K7A8dN+R5E8GEadoP7sU= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2/go.mod h1:aiYBYui4BJ/BJCAIKs92XiPyQfTaBWqvHujDwKb6CBU= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0 h1:nyQWyZvwGTvunIMxi1Y9uXkcyr+I7TeNrr/foo4Kpk8= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0/go.mod h1:l38EPgmsp71HHLq9j7De57JcKOWPyhrsW1Awm1JS6K0= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 h1:tfLQ34V6F7tVSwoTf/4lH5sE0o6eCJuNDTmH09nDpbc= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3 v3.0.0-beta.2 h1:qiir/pptnHqp6hV8QwV+IExYIf6cPsXBfUDUXQ27t2Y= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3 v3.0.0-beta.2/go.mod h1:jVRrRDLCOuif95HDYC23ADTMlvahB7tMdl519m9Iyjc= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v2 v2.0.0 h1:xxe4naFUPYEW1W6C8yWrfFNmyZLnEbO+CsbsSF83wDo= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v2 v2.0.0/go.mod h1:aLFjumYDvv63tH1qnqkcmdjdZ6Sn+/viPv7H3jft0oY= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.4.0 h1:HlZMUZW8S4P9oob1nCHxCCKrytxyLc+24nUJGssoEto= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.4.0/go.mod h1:StGsLbuJh06Bd8IBfnAlIFV3fLb+gkczONWf15hpX2E= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/msi/armmsi v1.2.0 h1:z4YeiSXxnUI+PqB46Yj6MZA3nwb1CcJIkEMDrzUd8Cs= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/msi/armmsi v1.2.0/go.mod h1:rko9SzMxcMk0NJsNAxALEGaTYyy79bNRwxgJfrH0Spw= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 h1:QM6sE5k2ZT/vI5BEe0r7mqjsUSnhVBFbOsVkEuaEfiA= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0/go.mod h1:243D9iHbcQXoFUtgHJwL7gl2zx1aDuDMjvBZVGr2uW0= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 h1:Dd+RhdJn0OTtVGaeDLZpcumkIVCtA/3/Fo42+eoYvVM= @@ -21,8 +23,8 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armsubscriptions github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armsubscriptions v1.3.0/go.mod h1:TpiwjwnW/khS0LKs4vW5UmmT9OWcxaveS8U7+tlknzo= github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.1.0 h1:DRiANoJTiW6obBQe3SqZizkuV1PEgfiiGivmVocDy64= github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.1.0/go.mod h1:qLIye2hwb/ZouqhpSD9Zn3SJipvpEnz1Ywl3VUk9Y0s= -github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 h1:D3occbWoio4EBLkbkevetNMAVX197GkzbUMtqjGWn80= -github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0/go.mod h1:bTSOgj05NGRuHHhQwAdPnYr9TOdNmKlZTgGLL6nyAdI= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.1 h1:9fXQS/0TtQmKXp8SureKouF+idbQvp7cPUxykiohnBs= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.1/go.mod h1:f+OaoSg0VQYPMqB0Jp2D54j1VHzITYcJaCNwV+k00ts= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -227,13 +229,13 @@ github.com/google/renameio v1.0.1/go.mod h1:t/HQoYBZSsWSNK35C6CO/TpPLDVWvxOHboWU github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gorilla/schema v1.2.1 h1:tjDxcmdb+siIqkTNoV+qRH2mjYdr2hHe5MKXbp61ziM= -github.com/gorilla/schema v1.2.1/go.mod h1:Dg5SSm5PV60mhF2NFaTV1xuYYj8tV8NOPRo4FggUMnM= +github.com/gorilla/schema v1.4.1 h1:jUg5hUjCSDZpNGLuXQOgIWGdlgrIdYvgQ0wZtdK1M3E= +github.com/gorilla/schema v1.4.1/go.mod h1:Dg5SSm5PV60mhF2NFaTV1xuYYj8tV8NOPRo4FggUMnM= github.com/gorilla/securecookie v1.1.2 h1:YCIWL56dvtr73r6715mJs5ZvhtnY73hBvEF8kXD8ePA= github.com/gorilla/securecookie v1.1.2/go.mod h1:NfCASbcHqRSY+3a8tlWJwsQap2VX5pwzwo4h3eOamfo= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= -github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hashicorp/cli v1.1.6 h1:CMOV+/LJfL1tXCOKrgAX0uRKnzjj/mpmqNXloRSy2K8= github.com/hashicorp/cli v1.1.6/go.mod h1:MPon5QYlgjjo0BSoAiN0ESeT5fRzDjVRp+uioJ0piz4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -334,8 +336,8 @@ github.com/juju/cmd/v3 v3.0.16 h1:P/tG4BPtE+MsmECtnFx+KBC8NFi1ESvHbZ8NzMAll1g= github.com/juju/cmd/v3 v3.0.16/go.mod h1:lGtDvm2BG+FKnIS8yY/vrhxQNX9imnL6bPIYGSTchuI= github.com/juju/collections v1.0.4 h1:GjL+aN512m2rVDqhPII7P6qB0e+iYFubz8sqBhZaZtk= github.com/juju/collections v1.0.4/go.mod h1:hVrdB0Zwq9wIU1Fl6ItD2+UETeNeOEs+nGvJufVe+0c= -github.com/juju/description/v5 v5.0.4 h1:qA35hRglZ47j1mmo9zUM9R+2WSDCH5dvL5ik7gA2aVE= -github.com/juju/description/v5 v5.0.4/go.mod h1:TQsp2Z56EVab7onQY2/O6tLHznovAcckyLz/DgDfVPY= +github.com/juju/description/v7 v7.0.2 h1:v44ZkjMeuIwvQQ/abFNS/W2SUQaN6zWfJz0dhuEAtZ0= +github.com/juju/description/v7 v7.0.2/go.mod h1:lEwq+EiDmUgJ5V4UIDLppWx3sYc/5o1GW32MXb8Ko+k= github.com/juju/errors v1.0.0 h1:yiq7kjCLll1BiaRuNY53MGI0+EQ3rF6GB+wvboZDefM= github.com/juju/errors v1.0.0/go.mod h1:B5x9thDqx0wIMH3+aLIMP9HjItInYWObRovoCFM5Qe8= github.com/juju/featureflag v1.0.0 h1:J2g8R5BevAMJWVNEJ+AvyaFE6469JU0U7QWCkt3Npvk= @@ -356,8 +358,8 @@ github.com/juju/idmclient/v2 v2.0.0 h1:PsGa092JGy6iFNHZCcao+bigVsTyz1C+tHNRdYmKv github.com/juju/idmclient/v2 v2.0.0/go.mod h1:EOiFbPmnkqKvCUS/DHpDRWhL7eKF0AJaTvMjIYlIUak= github.com/juju/jsonschema v1.0.0 h1:2ScR9hhVdHxft+Te3fnclVx61MmlikHNEOirTGi+hV4= github.com/juju/jsonschema v1.0.0/go.mod h1:SlFW+jFtpWX0P4Tb+zTTPR4ufttLrnJIdQPePxVEfkM= -github.com/juju/juju v0.0.0-20240724081236-63d460f9ee6c h1:QDl1j+JwkfagsftAffgSa+YBzx8KwjwoeHDIFRKoYEQ= -github.com/juju/juju v0.0.0-20240724081236-63d460f9ee6c/go.mod h1:BB8d/2+xfqC3WYkQwNuuMZ5H/ZrgA5MmOlMOY/oXc+k= +github.com/juju/juju v0.0.0-20241125225906-6dec77a01480 h1:gg6vA9vT8HzgpSpa1o8MjwB1JK7oVQWOkKDVR3MaVU4= +github.com/juju/juju v0.0.0-20241125225906-6dec77a01480/go.mod h1:ljZSb7tD6LA0gsxo7gneTZ9Lu0LcI/8HsBjAav/rswQ= github.com/juju/loggo v1.0.0 h1:Y6ZMQOGR9Aj3BGkiWx7HBbIx6zNwNkxhVNOHU2i1bl0= github.com/juju/loggo v1.0.0/go.mod h1:NIXFioti1SmKAlKNuUwbMenNdef59IF52+ZzuOmHYkg= github.com/juju/lru v1.0.0 h1:FP8mBNF3jBnKwGO5PtsR+8iIegx8DREfhRhpcGpYcn4= @@ -664,8 +666,8 @@ go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ3 go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= -go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= -go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= +go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= +go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= @@ -673,8 +675,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/crypto v0.30.0 h1:RwoQn3GkWiMkzlX562cLB7OxWvjH1L8xutO2WoJcRoY= +golang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20231127185646-65229373498e h1:Gvh4YaCaXNs6dKTlfgismwWZKyjVZXwOPfIyUaqU3No= golang.org/x/exp v0.0.0-20231127185646-65229373498e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= @@ -685,8 +687,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= -golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -700,19 +702,19 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= +golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= -golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -734,23 +736,23 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= -golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= -golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= +golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= +golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -762,8 +764,8 @@ golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= -golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= +golang.org/x/tools v0.28.0 h1:WuB6qZ4RPCQo5aP3WdKZS7i595EdWqWR8vqJTlwTVK8= +golang.org/x/tools v0.28.0/go.mod h1:dcIOrVd3mfQKTgrDVQHqCPMWy6lnhfhtX3hLXYVLfRw= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/internal/juju/jujuapi_mock_test.go b/internal/juju/jujuapi_mock_test.go index 5330397f..d533b69d 100644 --- a/internal/juju/jujuapi_mock_test.go +++ b/internal/juju/jujuapi_mock_test.go @@ -29,6 +29,7 @@ import ( type MockConnection struct { ctrl *gomock.Controller recorder *MockConnectionMockRecorder + isgomock struct{} } // MockConnectionMockRecorder is the mock recorder for MockConnection. @@ -49,17 +50,17 @@ func (m *MockConnection) EXPECT() *MockConnectionMockRecorder { } // APICall mocks base method. -func (m *MockConnection) APICall(arg0 string, arg1 int, arg2, arg3 string, arg4, arg5 any) error { +func (m *MockConnection) APICall(objType string, version int, id, request string, params, response any) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "APICall", arg0, arg1, arg2, arg3, arg4, arg5) + ret := m.ctrl.Call(m, "APICall", objType, version, id, request, params, response) ret0, _ := ret[0].(error) return ret0 } // APICall indicates an expected call of APICall. -func (mr *MockConnectionMockRecorder) APICall(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call { +func (mr *MockConnectionMockRecorder) APICall(objType, version, id, request, params, response any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockConnection)(nil).APICall), arg0, arg1, arg2, arg3, arg4, arg5) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APICall", reflect.TypeOf((*MockConnection)(nil).APICall), objType, version, id, request, params, response) } // APIHostPorts mocks base method. @@ -119,17 +120,17 @@ func (mr *MockConnectionMockRecorder) BakeryClient() *gomock.Call { } // BestFacadeVersion mocks base method. -func (m *MockConnection) BestFacadeVersion(arg0 string) int { +func (m *MockConnection) BestFacadeVersion(facade string) int { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BestFacadeVersion", arg0) + ret := m.ctrl.Call(m, "BestFacadeVersion", facade) ret0, _ := ret[0].(int) return ret0 } // BestFacadeVersion indicates an expected call of BestFacadeVersion. -func (mr *MockConnectionMockRecorder) BestFacadeVersion(arg0 any) *gomock.Call { +func (mr *MockConnectionMockRecorder) BestFacadeVersion(facade any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockConnection)(nil).BestFacadeVersion), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BestFacadeVersion", reflect.TypeOf((*MockConnection)(nil).BestFacadeVersion), facade) } // Broken mocks base method. @@ -161,33 +162,33 @@ func (mr *MockConnectionMockRecorder) Close() *gomock.Call { } // ConnectControllerStream mocks base method. -func (m *MockConnection) ConnectControllerStream(arg0 string, arg1 url.Values, arg2 http.Header) (base.Stream, error) { +func (m *MockConnection) ConnectControllerStream(path string, attrs url.Values, headers http.Header) (base.Stream, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ConnectControllerStream", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ConnectControllerStream", path, attrs, headers) ret0, _ := ret[0].(base.Stream) ret1, _ := ret[1].(error) return ret0, ret1 } // ConnectControllerStream indicates an expected call of ConnectControllerStream. -func (mr *MockConnectionMockRecorder) ConnectControllerStream(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockConnectionMockRecorder) ConnectControllerStream(path, attrs, headers any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockConnection)(nil).ConnectControllerStream), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectControllerStream", reflect.TypeOf((*MockConnection)(nil).ConnectControllerStream), path, attrs, headers) } // ConnectStream mocks base method. -func (m *MockConnection) ConnectStream(arg0 string, arg1 url.Values) (base.Stream, error) { +func (m *MockConnection) ConnectStream(path string, attrs url.Values) (base.Stream, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ConnectStream", arg0, arg1) + ret := m.ctrl.Call(m, "ConnectStream", path, attrs) ret0, _ := ret[0].(base.Stream) ret1, _ := ret[1].(error) return ret0, ret1 } // ConnectStream indicates an expected call of ConnectStream. -func (mr *MockConnectionMockRecorder) ConnectStream(arg0, arg1 any) *gomock.Call { +func (mr *MockConnectionMockRecorder) ConnectStream(path, attrs any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockConnection)(nil).ConnectStream), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectStream", reflect.TypeOf((*MockConnection)(nil).ConnectStream), path, attrs) } // Context mocks base method. @@ -304,17 +305,17 @@ func (mr *MockConnectionMockRecorder) IsProxied() *gomock.Call { } // Login mocks base method. -func (m *MockConnection) Login(arg0 names.Tag, arg1, arg2 string, arg3 []macaroon.Slice) error { +func (m *MockConnection) Login(name names.Tag, password, nonce string, ms []macaroon.Slice) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Login", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "Login", name, password, nonce, ms) ret0, _ := ret[0].(error) return ret0 } // Login indicates an expected call of Login. -func (mr *MockConnectionMockRecorder) Login(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockConnectionMockRecorder) Login(name, password, nonce, ms any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Login", reflect.TypeOf((*MockConnection)(nil).Login), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Login", reflect.TypeOf((*MockConnection)(nil).Login), name, password, nonce, ms) } // ModelTag mocks base method. diff --git a/internal/juju/machines.go b/internal/juju/machines.go index 1373adda..121ead3a 100644 --- a/internal/juju/machines.go +++ b/internal/juju/machines.go @@ -282,15 +282,16 @@ func manualProvision(client manual.ProvisioningClientAPI, } // Find out about the series of the machine just provisioned // (because ProvisionMachine only returns machineId) - _, machineSeries, err := sshprovisioner.DetectSeriesAndHardwareCharacteristics(host) + _, machineBase, err := sshprovisioner.DetectBaseAndHardwareCharacteristics(host) if err != nil { return nil, errors.Annotatef(err, "error detecting hardware characteristics") } - machineBase, err := base.GetBaseFromSeries(machineSeries) + machineSeries, err := base.GetSeriesFromBase(machineBase) if err != nil { return nil, err } + // This might cause problems later, but today, no one except for juju internals // uses the channel risk. Using the risk makes the base appear to have changed // with terraform. diff --git a/internal/juju/mock_test.go b/internal/juju/mock_test.go index 3f02bb4e..0ea21317 100644 --- a/internal/juju/mock_test.go +++ b/internal/juju/mock_test.go @@ -36,6 +36,7 @@ import ( type MockSharedClient struct { ctrl *gomock.Controller recorder *MockSharedClientMockRecorder + isgomock struct{} } // MockSharedClientMockRecorder is the mock recorder for MockSharedClient. @@ -56,59 +57,59 @@ func (m *MockSharedClient) EXPECT() *MockSharedClientMockRecorder { } // AddModel mocks base method. -func (m *MockSharedClient) AddModel(arg0, arg1 string, arg2 model.ModelType) { +func (m *MockSharedClient) AddModel(modelName, modelUUID string, modelType model.ModelType) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AddModel", arg0, arg1, arg2) + m.ctrl.Call(m, "AddModel", modelName, modelUUID, modelType) } // AddModel indicates an expected call of AddModel. -func (mr *MockSharedClientMockRecorder) AddModel(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSharedClientMockRecorder) AddModel(modelName, modelUUID, modelType any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddModel", reflect.TypeOf((*MockSharedClient)(nil).AddModel), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddModel", reflect.TypeOf((*MockSharedClient)(nil).AddModel), modelName, modelUUID, modelType) } // Debugf mocks base method. -func (m *MockSharedClient) Debugf(arg0 string, arg1 ...map[string]any) { +func (m *MockSharedClient) Debugf(msg string, additionalFields ...map[string]any) { m.ctrl.T.Helper() - varargs := []any{arg0} - for _, a := range arg1 { + varargs := []any{msg} + for _, a := range additionalFields { varargs = append(varargs, a) } m.ctrl.Call(m, "Debugf", varargs...) } // Debugf indicates an expected call of Debugf. -func (mr *MockSharedClientMockRecorder) Debugf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockSharedClientMockRecorder) Debugf(msg any, additionalFields ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0}, arg1...) + varargs := append([]any{msg}, additionalFields...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debugf", reflect.TypeOf((*MockSharedClient)(nil).Debugf), varargs...) } // Errorf mocks base method. -func (m *MockSharedClient) Errorf(arg0 error, arg1 string) { +func (m *MockSharedClient) Errorf(err error, msg string) { m.ctrl.T.Helper() - m.ctrl.Call(m, "Errorf", arg0, arg1) + m.ctrl.Call(m, "Errorf", err, msg) } // Errorf indicates an expected call of Errorf. -func (mr *MockSharedClientMockRecorder) Errorf(arg0, arg1 any) *gomock.Call { +func (mr *MockSharedClientMockRecorder) Errorf(err, msg any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockSharedClient)(nil).Errorf), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockSharedClient)(nil).Errorf), err, msg) } // GetConnection mocks base method. -func (m *MockSharedClient) GetConnection(arg0 *string) (api.Connection, error) { +func (m *MockSharedClient) GetConnection(modelName *string) (api.Connection, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetConnection", arg0) + ret := m.ctrl.Call(m, "GetConnection", modelName) ret0, _ := ret[0].(api.Connection) ret1, _ := ret[1].(error) return ret0, ret1 } // GetConnection indicates an expected call of GetConnection. -func (mr *MockSharedClientMockRecorder) GetConnection(arg0 any) *gomock.Call { +func (mr *MockSharedClientMockRecorder) GetConnection(modelName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConnection", reflect.TypeOf((*MockSharedClient)(nil).GetConnection), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConnection", reflect.TypeOf((*MockSharedClient)(nil).GetConnection), modelName) } // JujuLogger mocks base method. @@ -126,78 +127,78 @@ func (mr *MockSharedClientMockRecorder) JujuLogger() *gomock.Call { } // ModelType mocks base method. -func (m *MockSharedClient) ModelType(arg0 string) (model.ModelType, error) { +func (m *MockSharedClient) ModelType(modelName string) (model.ModelType, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ModelType", arg0) + ret := m.ctrl.Call(m, "ModelType", modelName) ret0, _ := ret[0].(model.ModelType) ret1, _ := ret[1].(error) return ret0, ret1 } // ModelType indicates an expected call of ModelType. -func (mr *MockSharedClientMockRecorder) ModelType(arg0 any) *gomock.Call { +func (mr *MockSharedClientMockRecorder) ModelType(modelName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelType", reflect.TypeOf((*MockSharedClient)(nil).ModelType), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelType", reflect.TypeOf((*MockSharedClient)(nil).ModelType), modelName) } // ModelUUID mocks base method. -func (m *MockSharedClient) ModelUUID(arg0 string) (string, error) { +func (m *MockSharedClient) ModelUUID(modelName string) (string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ModelUUID", arg0) + ret := m.ctrl.Call(m, "ModelUUID", modelName) ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 } // ModelUUID indicates an expected call of ModelUUID. -func (mr *MockSharedClientMockRecorder) ModelUUID(arg0 any) *gomock.Call { +func (mr *MockSharedClientMockRecorder) ModelUUID(modelName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockSharedClient)(nil).ModelUUID), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModelUUID", reflect.TypeOf((*MockSharedClient)(nil).ModelUUID), modelName) } // RemoveModel mocks base method. -func (m *MockSharedClient) RemoveModel(arg0 string) { +func (m *MockSharedClient) RemoveModel(modelUUID string) { m.ctrl.T.Helper() - m.ctrl.Call(m, "RemoveModel", arg0) + m.ctrl.Call(m, "RemoveModel", modelUUID) } // RemoveModel indicates an expected call of RemoveModel. -func (mr *MockSharedClientMockRecorder) RemoveModel(arg0 any) *gomock.Call { +func (mr *MockSharedClientMockRecorder) RemoveModel(modelUUID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveModel", reflect.TypeOf((*MockSharedClient)(nil).RemoveModel), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveModel", reflect.TypeOf((*MockSharedClient)(nil).RemoveModel), modelUUID) } // Tracef mocks base method. -func (m *MockSharedClient) Tracef(arg0 string, arg1 ...map[string]any) { +func (m *MockSharedClient) Tracef(msg string, additionalFields ...map[string]any) { m.ctrl.T.Helper() - varargs := []any{arg0} - for _, a := range arg1 { + varargs := []any{msg} + for _, a := range additionalFields { varargs = append(varargs, a) } m.ctrl.Call(m, "Tracef", varargs...) } // Tracef indicates an expected call of Tracef. -func (mr *MockSharedClientMockRecorder) Tracef(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockSharedClientMockRecorder) Tracef(msg any, additionalFields ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0}, arg1...) + varargs := append([]any{msg}, additionalFields...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tracef", reflect.TypeOf((*MockSharedClient)(nil).Tracef), varargs...) } // Warnf mocks base method. -func (m *MockSharedClient) Warnf(arg0 string, arg1 ...map[string]any) { +func (m *MockSharedClient) Warnf(msg string, additionalFields ...map[string]any) { m.ctrl.T.Helper() - varargs := []any{arg0} - for _, a := range arg1 { + varargs := []any{msg} + for _, a := range additionalFields { varargs = append(varargs, a) } m.ctrl.Call(m, "Warnf", varargs...) } // Warnf indicates an expected call of Warnf. -func (mr *MockSharedClientMockRecorder) Warnf(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockSharedClientMockRecorder) Warnf(msg any, additionalFields ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0}, arg1...) + varargs := append([]any{msg}, additionalFields...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warnf", reflect.TypeOf((*MockSharedClient)(nil).Warnf), varargs...) } @@ -205,6 +206,7 @@ func (mr *MockSharedClientMockRecorder) Warnf(arg0 any, arg1 ...any) *gomock.Cal type MockClientAPIClient struct { ctrl *gomock.Controller recorder *MockClientAPIClientMockRecorder + isgomock struct{} } // MockClientAPIClientMockRecorder is the mock recorder for MockClientAPIClient. @@ -225,24 +227,25 @@ func (m *MockClientAPIClient) EXPECT() *MockClientAPIClientMockRecorder { } // Status mocks base method. -func (m *MockClientAPIClient) Status(arg0 *client.StatusArgs) (*params0.FullStatus, error) { +func (m *MockClientAPIClient) Status(args *client.StatusArgs) (*params0.FullStatus, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Status", arg0) + ret := m.ctrl.Call(m, "Status", args) ret0, _ := ret[0].(*params0.FullStatus) ret1, _ := ret[1].(error) return ret0, ret1 } // Status indicates an expected call of Status. -func (mr *MockClientAPIClientMockRecorder) Status(arg0 any) *gomock.Call { +func (mr *MockClientAPIClientMockRecorder) Status(args any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockClientAPIClient)(nil).Status), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockClientAPIClient)(nil).Status), args) } // MockApplicationAPIClient is a mock of ApplicationAPIClient interface. type MockApplicationAPIClient struct { ctrl *gomock.Controller recorder *MockApplicationAPIClientMockRecorder + isgomock struct{} } // MockApplicationAPIClientMockRecorder is the mock recorder for MockApplicationAPIClient. @@ -263,53 +266,53 @@ func (m *MockApplicationAPIClient) EXPECT() *MockApplicationAPIClientMockRecorde } // AddUnits mocks base method. -func (m *MockApplicationAPIClient) AddUnits(arg0 application.AddUnitsParams) ([]string, error) { +func (m *MockApplicationAPIClient) AddUnits(args application.AddUnitsParams) ([]string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddUnits", arg0) + ret := m.ctrl.Call(m, "AddUnits", args) ret0, _ := ret[0].([]string) ret1, _ := ret[1].(error) return ret0, ret1 } // AddUnits indicates an expected call of AddUnits. -func (mr *MockApplicationAPIClientMockRecorder) AddUnits(arg0 any) *gomock.Call { +func (mr *MockApplicationAPIClientMockRecorder) AddUnits(args any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUnits", reflect.TypeOf((*MockApplicationAPIClient)(nil).AddUnits), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUnits", reflect.TypeOf((*MockApplicationAPIClient)(nil).AddUnits), args) } // ApplicationsInfo mocks base method. -func (m *MockApplicationAPIClient) ApplicationsInfo(arg0 []names.ApplicationTag) ([]params0.ApplicationInfoResult, error) { +func (m *MockApplicationAPIClient) ApplicationsInfo(applications []names.ApplicationTag) ([]params0.ApplicationInfoResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ApplicationsInfo", arg0) + ret := m.ctrl.Call(m, "ApplicationsInfo", applications) ret0, _ := ret[0].([]params0.ApplicationInfoResult) ret1, _ := ret[1].(error) return ret0, ret1 } // ApplicationsInfo indicates an expected call of ApplicationsInfo. -func (mr *MockApplicationAPIClientMockRecorder) ApplicationsInfo(arg0 any) *gomock.Call { +func (mr *MockApplicationAPIClientMockRecorder) ApplicationsInfo(applications any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationsInfo", reflect.TypeOf((*MockApplicationAPIClient)(nil).ApplicationsInfo), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplicationsInfo", reflect.TypeOf((*MockApplicationAPIClient)(nil).ApplicationsInfo), applications) } // Deploy mocks base method. -func (m *MockApplicationAPIClient) Deploy(arg0 application.DeployArgs) error { +func (m *MockApplicationAPIClient) Deploy(args application.DeployArgs) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Deploy", arg0) + ret := m.ctrl.Call(m, "Deploy", args) ret0, _ := ret[0].(error) return ret0 } // Deploy indicates an expected call of Deploy. -func (mr *MockApplicationAPIClientMockRecorder) Deploy(arg0 any) *gomock.Call { +func (mr *MockApplicationAPIClientMockRecorder) Deploy(args any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Deploy", reflect.TypeOf((*MockApplicationAPIClient)(nil).Deploy), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Deploy", reflect.TypeOf((*MockApplicationAPIClient)(nil).Deploy), args) } // DeployFromRepository mocks base method. -func (m *MockApplicationAPIClient) DeployFromRepository(arg0 application.DeployFromRepositoryArg) (application.DeployInfo, []application.PendingResourceUpload, []error) { +func (m *MockApplicationAPIClient) DeployFromRepository(arg application.DeployFromRepositoryArg) (application.DeployInfo, []application.PendingResourceUpload, []error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeployFromRepository", arg0) + ret := m.ctrl.Call(m, "DeployFromRepository", arg) ret0, _ := ret[0].(application.DeployInfo) ret1, _ := ret[1].([]application.PendingResourceUpload) ret2, _ := ret[2].([]error) @@ -317,74 +320,74 @@ func (m *MockApplicationAPIClient) DeployFromRepository(arg0 application.DeployF } // DeployFromRepository indicates an expected call of DeployFromRepository. -func (mr *MockApplicationAPIClientMockRecorder) DeployFromRepository(arg0 any) *gomock.Call { +func (mr *MockApplicationAPIClientMockRecorder) DeployFromRepository(arg any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeployFromRepository", reflect.TypeOf((*MockApplicationAPIClient)(nil).DeployFromRepository), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeployFromRepository", reflect.TypeOf((*MockApplicationAPIClient)(nil).DeployFromRepository), arg) } // DestroyApplications mocks base method. -func (m *MockApplicationAPIClient) DestroyApplications(arg0 application.DestroyApplicationsParams) ([]params0.DestroyApplicationResult, error) { +func (m *MockApplicationAPIClient) DestroyApplications(in application.DestroyApplicationsParams) ([]params0.DestroyApplicationResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DestroyApplications", arg0) + ret := m.ctrl.Call(m, "DestroyApplications", in) ret0, _ := ret[0].([]params0.DestroyApplicationResult) ret1, _ := ret[1].(error) return ret0, ret1 } // DestroyApplications indicates an expected call of DestroyApplications. -func (mr *MockApplicationAPIClientMockRecorder) DestroyApplications(arg0 any) *gomock.Call { +func (mr *MockApplicationAPIClientMockRecorder) DestroyApplications(in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyApplications", reflect.TypeOf((*MockApplicationAPIClient)(nil).DestroyApplications), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyApplications", reflect.TypeOf((*MockApplicationAPIClient)(nil).DestroyApplications), in) } // DestroyUnits mocks base method. -func (m *MockApplicationAPIClient) DestroyUnits(arg0 application.DestroyUnitsParams) ([]params0.DestroyUnitResult, error) { +func (m *MockApplicationAPIClient) DestroyUnits(in application.DestroyUnitsParams) ([]params0.DestroyUnitResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DestroyUnits", arg0) + ret := m.ctrl.Call(m, "DestroyUnits", in) ret0, _ := ret[0].([]params0.DestroyUnitResult) ret1, _ := ret[1].(error) return ret0, ret1 } // DestroyUnits indicates an expected call of DestroyUnits. -func (mr *MockApplicationAPIClientMockRecorder) DestroyUnits(arg0 any) *gomock.Call { +func (mr *MockApplicationAPIClientMockRecorder) DestroyUnits(in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyUnits", reflect.TypeOf((*MockApplicationAPIClient)(nil).DestroyUnits), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DestroyUnits", reflect.TypeOf((*MockApplicationAPIClient)(nil).DestroyUnits), in) } // Expose mocks base method. -func (m *MockApplicationAPIClient) Expose(arg0 string, arg1 map[string]params0.ExposedEndpoint) error { +func (m *MockApplicationAPIClient) Expose(application string, exposedEndpoints map[string]params0.ExposedEndpoint) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Expose", arg0, arg1) + ret := m.ctrl.Call(m, "Expose", application, exposedEndpoints) ret0, _ := ret[0].(error) return ret0 } // Expose indicates an expected call of Expose. -func (mr *MockApplicationAPIClientMockRecorder) Expose(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationAPIClientMockRecorder) Expose(application, exposedEndpoints any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Expose", reflect.TypeOf((*MockApplicationAPIClient)(nil).Expose), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Expose", reflect.TypeOf((*MockApplicationAPIClient)(nil).Expose), application, exposedEndpoints) } // Get mocks base method. -func (m *MockApplicationAPIClient) Get(arg0, arg1 string) (*params0.ApplicationGetResults, error) { +func (m *MockApplicationAPIClient) Get(branchName, application string) (*params0.ApplicationGetResults, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", branchName, application) ret0, _ := ret[0].(*params0.ApplicationGetResults) ret1, _ := ret[1].(error) return ret0, ret1 } // Get indicates an expected call of Get. -func (mr *MockApplicationAPIClientMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationAPIClientMockRecorder) Get(branchName, application any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockApplicationAPIClient)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockApplicationAPIClient)(nil).Get), branchName, application) } // GetCharmURLOrigin mocks base method. -func (m *MockApplicationAPIClient) GetCharmURLOrigin(arg0, arg1 string) (*charm.URL, charm0.Origin, error) { +func (m *MockApplicationAPIClient) GetCharmURLOrigin(branchName, applicationName string) (*charm.URL, charm0.Origin, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetCharmURLOrigin", arg0, arg1) + ret := m.ctrl.Call(m, "GetCharmURLOrigin", branchName, applicationName) ret0, _ := ret[0].(*charm.URL) ret1, _ := ret[1].(charm0.Origin) ret2, _ := ret[2].(error) @@ -392,16 +395,16 @@ func (m *MockApplicationAPIClient) GetCharmURLOrigin(arg0, arg1 string) (*charm. } // GetCharmURLOrigin indicates an expected call of GetCharmURLOrigin. -func (mr *MockApplicationAPIClientMockRecorder) GetCharmURLOrigin(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationAPIClientMockRecorder) GetCharmURLOrigin(branchName, applicationName any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharmURLOrigin", reflect.TypeOf((*MockApplicationAPIClient)(nil).GetCharmURLOrigin), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCharmURLOrigin", reflect.TypeOf((*MockApplicationAPIClient)(nil).GetCharmURLOrigin), branchName, applicationName) } // GetConstraints mocks base method. -func (m *MockApplicationAPIClient) GetConstraints(arg0 ...string) ([]constraints.Value, error) { +func (m *MockApplicationAPIClient) GetConstraints(applications ...string) ([]constraints.Value, error) { m.ctrl.T.Helper() varargs := []any{} - for _, a := range arg0 { + for _, a := range applications { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetConstraints", varargs...) @@ -411,100 +414,101 @@ func (m *MockApplicationAPIClient) GetConstraints(arg0 ...string) ([]constraints } // GetConstraints indicates an expected call of GetConstraints. -func (mr *MockApplicationAPIClientMockRecorder) GetConstraints(arg0 ...any) *gomock.Call { +func (mr *MockApplicationAPIClientMockRecorder) GetConstraints(applications ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConstraints", reflect.TypeOf((*MockApplicationAPIClient)(nil).GetConstraints), arg0...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConstraints", reflect.TypeOf((*MockApplicationAPIClient)(nil).GetConstraints), applications...) } // MergeBindings mocks base method. -func (m *MockApplicationAPIClient) MergeBindings(arg0 params0.ApplicationMergeBindingsArgs) error { +func (m *MockApplicationAPIClient) MergeBindings(req params0.ApplicationMergeBindingsArgs) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "MergeBindings", arg0) + ret := m.ctrl.Call(m, "MergeBindings", req) ret0, _ := ret[0].(error) return ret0 } // MergeBindings indicates an expected call of MergeBindings. -func (mr *MockApplicationAPIClientMockRecorder) MergeBindings(arg0 any) *gomock.Call { +func (mr *MockApplicationAPIClientMockRecorder) MergeBindings(req any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MergeBindings", reflect.TypeOf((*MockApplicationAPIClient)(nil).MergeBindings), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MergeBindings", reflect.TypeOf((*MockApplicationAPIClient)(nil).MergeBindings), req) } // ScaleApplication mocks base method. -func (m *MockApplicationAPIClient) ScaleApplication(arg0 application.ScaleApplicationParams) (params0.ScaleApplicationResult, error) { +func (m *MockApplicationAPIClient) ScaleApplication(in application.ScaleApplicationParams) (params0.ScaleApplicationResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ScaleApplication", arg0) + ret := m.ctrl.Call(m, "ScaleApplication", in) ret0, _ := ret[0].(params0.ScaleApplicationResult) ret1, _ := ret[1].(error) return ret0, ret1 } // ScaleApplication indicates an expected call of ScaleApplication. -func (mr *MockApplicationAPIClientMockRecorder) ScaleApplication(arg0 any) *gomock.Call { +func (mr *MockApplicationAPIClientMockRecorder) ScaleApplication(in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ScaleApplication", reflect.TypeOf((*MockApplicationAPIClient)(nil).ScaleApplication), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ScaleApplication", reflect.TypeOf((*MockApplicationAPIClient)(nil).ScaleApplication), in) } // SetCharm mocks base method. -func (m *MockApplicationAPIClient) SetCharm(arg0 string, arg1 application.SetCharmConfig) error { +func (m *MockApplicationAPIClient) SetCharm(branchName string, cfg application.SetCharmConfig) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SetCharm", arg0, arg1) + ret := m.ctrl.Call(m, "SetCharm", branchName, cfg) ret0, _ := ret[0].(error) return ret0 } // SetCharm indicates an expected call of SetCharm. -func (mr *MockApplicationAPIClientMockRecorder) SetCharm(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationAPIClientMockRecorder) SetCharm(branchName, cfg any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharm", reflect.TypeOf((*MockApplicationAPIClient)(nil).SetCharm), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCharm", reflect.TypeOf((*MockApplicationAPIClient)(nil).SetCharm), branchName, cfg) } // SetConfig mocks base method. -func (m *MockApplicationAPIClient) SetConfig(arg0, arg1, arg2 string, arg3 map[string]string) error { +func (m *MockApplicationAPIClient) SetConfig(branchName, application, configYAML string, config map[string]string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SetConfig", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "SetConfig", branchName, application, configYAML, config) ret0, _ := ret[0].(error) return ret0 } // SetConfig indicates an expected call of SetConfig. -func (mr *MockApplicationAPIClientMockRecorder) SetConfig(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockApplicationAPIClientMockRecorder) SetConfig(branchName, application, configYAML, config any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockApplicationAPIClient)(nil).SetConfig), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfig", reflect.TypeOf((*MockApplicationAPIClient)(nil).SetConfig), branchName, application, configYAML, config) } // SetConstraints mocks base method. -func (m *MockApplicationAPIClient) SetConstraints(arg0 string, arg1 constraints.Value) error { +func (m *MockApplicationAPIClient) SetConstraints(application string, constraints constraints.Value) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SetConstraints", arg0, arg1) + ret := m.ctrl.Call(m, "SetConstraints", application, constraints) ret0, _ := ret[0].(error) return ret0 } // SetConstraints indicates an expected call of SetConstraints. -func (mr *MockApplicationAPIClientMockRecorder) SetConstraints(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationAPIClientMockRecorder) SetConstraints(application, constraints any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConstraints", reflect.TypeOf((*MockApplicationAPIClient)(nil).SetConstraints), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConstraints", reflect.TypeOf((*MockApplicationAPIClient)(nil).SetConstraints), application, constraints) } // Unexpose mocks base method. -func (m *MockApplicationAPIClient) Unexpose(arg0 string, arg1 []string) error { +func (m *MockApplicationAPIClient) Unexpose(application string, endpoints []string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Unexpose", arg0, arg1) + ret := m.ctrl.Call(m, "Unexpose", application, endpoints) ret0, _ := ret[0].(error) return ret0 } // Unexpose indicates an expected call of Unexpose. -func (mr *MockApplicationAPIClientMockRecorder) Unexpose(arg0, arg1 any) *gomock.Call { +func (mr *MockApplicationAPIClientMockRecorder) Unexpose(application, endpoints any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unexpose", reflect.TypeOf((*MockApplicationAPIClient)(nil).Unexpose), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unexpose", reflect.TypeOf((*MockApplicationAPIClient)(nil).Unexpose), application, endpoints) } // MockModelConfigAPIClient is a mock of ModelConfigAPIClient interface. type MockModelConfigAPIClient struct { ctrl *gomock.Controller recorder *MockModelConfigAPIClientMockRecorder + isgomock struct{} } // MockModelConfigAPIClientMockRecorder is the mock recorder for MockModelConfigAPIClient. @@ -543,6 +547,7 @@ func (mr *MockModelConfigAPIClientMockRecorder) ModelGet() *gomock.Call { type MockResourceAPIClient struct { ctrl *gomock.Controller recorder *MockResourceAPIClientMockRecorder + isgomock struct{} } // MockResourceAPIClientMockRecorder is the mock recorder for MockResourceAPIClient. @@ -563,68 +568,69 @@ func (m *MockResourceAPIClient) EXPECT() *MockResourceAPIClientMockRecorder { } // AddPendingResources mocks base method. -func (m *MockResourceAPIClient) AddPendingResources(arg0 resources.AddPendingResourcesArgs) ([]string, error) { +func (m *MockResourceAPIClient) AddPendingResources(args resources.AddPendingResourcesArgs) ([]string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddPendingResources", arg0) + ret := m.ctrl.Call(m, "AddPendingResources", args) ret0, _ := ret[0].([]string) ret1, _ := ret[1].(error) return ret0, ret1 } // AddPendingResources indicates an expected call of AddPendingResources. -func (mr *MockResourceAPIClientMockRecorder) AddPendingResources(arg0 any) *gomock.Call { +func (mr *MockResourceAPIClientMockRecorder) AddPendingResources(args any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPendingResources", reflect.TypeOf((*MockResourceAPIClient)(nil).AddPendingResources), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPendingResources", reflect.TypeOf((*MockResourceAPIClient)(nil).AddPendingResources), args) } // ListResources mocks base method. -func (m *MockResourceAPIClient) ListResources(arg0 []string) ([]resources0.ApplicationResources, error) { +func (m *MockResourceAPIClient) ListResources(applications []string) ([]resources0.ApplicationResources, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ListResources", arg0) + ret := m.ctrl.Call(m, "ListResources", applications) ret0, _ := ret[0].([]resources0.ApplicationResources) ret1, _ := ret[1].(error) return ret0, ret1 } // ListResources indicates an expected call of ListResources. -func (mr *MockResourceAPIClientMockRecorder) ListResources(arg0 any) *gomock.Call { +func (mr *MockResourceAPIClientMockRecorder) ListResources(applications any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResources", reflect.TypeOf((*MockResourceAPIClient)(nil).ListResources), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResources", reflect.TypeOf((*MockResourceAPIClient)(nil).ListResources), applications) } // Upload mocks base method. -func (m *MockResourceAPIClient) Upload(arg0, arg1, arg2, arg3 string, arg4 io.ReadSeeker) error { +func (m *MockResourceAPIClient) Upload(application, name, filename, pendingID string, reader io.ReadSeeker) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Upload", arg0, arg1, arg2, arg3, arg4) + ret := m.ctrl.Call(m, "Upload", application, name, filename, pendingID, reader) ret0, _ := ret[0].(error) return ret0 } // Upload indicates an expected call of Upload. -func (mr *MockResourceAPIClientMockRecorder) Upload(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockResourceAPIClientMockRecorder) Upload(application, name, filename, pendingID, reader any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upload", reflect.TypeOf((*MockResourceAPIClient)(nil).Upload), arg0, arg1, arg2, arg3, arg4) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upload", reflect.TypeOf((*MockResourceAPIClient)(nil).Upload), application, name, filename, pendingID, reader) } // UploadPendingResource mocks base method. -func (m *MockResourceAPIClient) UploadPendingResource(arg0 string, arg1 resource.Resource, arg2 string, arg3 io.ReadSeeker) (string, error) { +func (m *MockResourceAPIClient) UploadPendingResource(applicationID string, resource resource.Resource, filename string, r io.ReadSeeker) (string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UploadPendingResource", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "UploadPendingResource", applicationID, resource, filename, r) ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 } // UploadPendingResource indicates an expected call of UploadPendingResource. -func (mr *MockResourceAPIClientMockRecorder) UploadPendingResource(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockResourceAPIClientMockRecorder) UploadPendingResource(applicationID, resource, filename, r any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadPendingResource", reflect.TypeOf((*MockResourceAPIClient)(nil).UploadPendingResource), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadPendingResource", reflect.TypeOf((*MockResourceAPIClient)(nil).UploadPendingResource), applicationID, resource, filename, r) } // MockSecretAPIClient is a mock of SecretAPIClient interface. type MockSecretAPIClient struct { ctrl *gomock.Controller recorder *MockSecretAPIClientMockRecorder + isgomock struct{} } // MockSecretAPIClientMockRecorder is the mock recorder for MockSecretAPIClient. @@ -645,97 +651,98 @@ func (m *MockSecretAPIClient) EXPECT() *MockSecretAPIClientMockRecorder { } // CreateSecret mocks base method. -func (m *MockSecretAPIClient) CreateSecret(arg0, arg1 string, arg2 map[string]string) (string, error) { +func (m *MockSecretAPIClient) CreateSecret(name, description string, data map[string]string) (string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateSecret", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "CreateSecret", name, description, data) ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 } // CreateSecret indicates an expected call of CreateSecret. -func (mr *MockSecretAPIClientMockRecorder) CreateSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretAPIClientMockRecorder) CreateSecret(name, description, data any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecret", reflect.TypeOf((*MockSecretAPIClient)(nil).CreateSecret), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecret", reflect.TypeOf((*MockSecretAPIClient)(nil).CreateSecret), name, description, data) } // GrantSecret mocks base method. -func (m *MockSecretAPIClient) GrantSecret(arg0 *secrets0.URI, arg1 string, arg2 []string) ([]error, error) { +func (m *MockSecretAPIClient) GrantSecret(uri *secrets0.URI, name string, apps []string) ([]error, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GrantSecret", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "GrantSecret", uri, name, apps) ret0, _ := ret[0].([]error) ret1, _ := ret[1].(error) return ret0, ret1 } // GrantSecret indicates an expected call of GrantSecret. -func (mr *MockSecretAPIClientMockRecorder) GrantSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretAPIClientMockRecorder) GrantSecret(uri, name, apps any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantSecret", reflect.TypeOf((*MockSecretAPIClient)(nil).GrantSecret), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GrantSecret", reflect.TypeOf((*MockSecretAPIClient)(nil).GrantSecret), uri, name, apps) } // ListSecrets mocks base method. -func (m *MockSecretAPIClient) ListSecrets(arg0 bool, arg1 secrets0.Filter) ([]secrets.SecretDetails, error) { +func (m *MockSecretAPIClient) ListSecrets(reveal bool, filter secrets0.Filter) ([]secrets.SecretDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ListSecrets", arg0, arg1) + ret := m.ctrl.Call(m, "ListSecrets", reveal, filter) ret0, _ := ret[0].([]secrets.SecretDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // ListSecrets indicates an expected call of ListSecrets. -func (mr *MockSecretAPIClientMockRecorder) ListSecrets(arg0, arg1 any) *gomock.Call { +func (mr *MockSecretAPIClientMockRecorder) ListSecrets(reveal, filter any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSecrets", reflect.TypeOf((*MockSecretAPIClient)(nil).ListSecrets), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSecrets", reflect.TypeOf((*MockSecretAPIClient)(nil).ListSecrets), reveal, filter) } // RemoveSecret mocks base method. -func (m *MockSecretAPIClient) RemoveSecret(arg0 *secrets0.URI, arg1 string, arg2 *int) error { +func (m *MockSecretAPIClient) RemoveSecret(uri *secrets0.URI, name string, revision *int) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveSecret", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "RemoveSecret", uri, name, revision) ret0, _ := ret[0].(error) return ret0 } // RemoveSecret indicates an expected call of RemoveSecret. -func (mr *MockSecretAPIClientMockRecorder) RemoveSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretAPIClientMockRecorder) RemoveSecret(uri, name, revision any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveSecret", reflect.TypeOf((*MockSecretAPIClient)(nil).RemoveSecret), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveSecret", reflect.TypeOf((*MockSecretAPIClient)(nil).RemoveSecret), uri, name, revision) } // RevokeSecret mocks base method. -func (m *MockSecretAPIClient) RevokeSecret(arg0 *secrets0.URI, arg1 string, arg2 []string) ([]error, error) { +func (m *MockSecretAPIClient) RevokeSecret(uri *secrets0.URI, name string, apps []string) ([]error, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RevokeSecret", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "RevokeSecret", uri, name, apps) ret0, _ := ret[0].([]error) ret1, _ := ret[1].(error) return ret0, ret1 } // RevokeSecret indicates an expected call of RevokeSecret. -func (mr *MockSecretAPIClientMockRecorder) RevokeSecret(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSecretAPIClientMockRecorder) RevokeSecret(uri, name, apps any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeSecret", reflect.TypeOf((*MockSecretAPIClient)(nil).RevokeSecret), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeSecret", reflect.TypeOf((*MockSecretAPIClient)(nil).RevokeSecret), uri, name, apps) } // UpdateSecret mocks base method. -func (m *MockSecretAPIClient) UpdateSecret(arg0 *secrets0.URI, arg1 string, arg2 *bool, arg3, arg4 string, arg5 map[string]string) error { +func (m *MockSecretAPIClient) UpdateSecret(uri *secrets0.URI, name string, autoPrune *bool, newName, description string, data map[string]string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateSecret", arg0, arg1, arg2, arg3, arg4, arg5) + ret := m.ctrl.Call(m, "UpdateSecret", uri, name, autoPrune, newName, description, data) ret0, _ := ret[0].(error) return ret0 } // UpdateSecret indicates an expected call of UpdateSecret. -func (mr *MockSecretAPIClientMockRecorder) UpdateSecret(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call { +func (mr *MockSecretAPIClientMockRecorder) UpdateSecret(uri, name, autoPrune, newName, description, data any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSecret", reflect.TypeOf((*MockSecretAPIClient)(nil).UpdateSecret), arg0, arg1, arg2, arg3, arg4, arg5) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSecret", reflect.TypeOf((*MockSecretAPIClient)(nil).UpdateSecret), uri, name, autoPrune, newName, description, data) } // MockJaasAPIClient is a mock of JaasAPIClient interface. type MockJaasAPIClient struct { ctrl *gomock.Controller recorder *MockJaasAPIClientMockRecorder + isgomock struct{} } // MockJaasAPIClientMockRecorder is the mock recorder for MockJaasAPIClient. @@ -756,110 +763,111 @@ func (m *MockJaasAPIClient) EXPECT() *MockJaasAPIClientMockRecorder { } // AddGroup mocks base method. -func (m *MockJaasAPIClient) AddGroup(arg0 *params.AddGroupRequest) (params.AddGroupResponse, error) { +func (m *MockJaasAPIClient) AddGroup(req *params.AddGroupRequest) (params.AddGroupResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddGroup", arg0) + ret := m.ctrl.Call(m, "AddGroup", req) ret0, _ := ret[0].(params.AddGroupResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // AddGroup indicates an expected call of AddGroup. -func (mr *MockJaasAPIClientMockRecorder) AddGroup(arg0 any) *gomock.Call { +func (mr *MockJaasAPIClientMockRecorder) AddGroup(req any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddGroup", reflect.TypeOf((*MockJaasAPIClient)(nil).AddGroup), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddGroup", reflect.TypeOf((*MockJaasAPIClient)(nil).AddGroup), req) } // AddRelation mocks base method. -func (m *MockJaasAPIClient) AddRelation(arg0 *params.AddRelationRequest) error { +func (m *MockJaasAPIClient) AddRelation(req *params.AddRelationRequest) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddRelation", arg0) + ret := m.ctrl.Call(m, "AddRelation", req) ret0, _ := ret[0].(error) return ret0 } // AddRelation indicates an expected call of AddRelation. -func (mr *MockJaasAPIClientMockRecorder) AddRelation(arg0 any) *gomock.Call { +func (mr *MockJaasAPIClientMockRecorder) AddRelation(req any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRelation", reflect.TypeOf((*MockJaasAPIClient)(nil).AddRelation), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRelation", reflect.TypeOf((*MockJaasAPIClient)(nil).AddRelation), req) } // GetGroup mocks base method. -func (m *MockJaasAPIClient) GetGroup(arg0 *params.GetGroupRequest) (params.GetGroupResponse, error) { +func (m *MockJaasAPIClient) GetGroup(req *params.GetGroupRequest) (params.GetGroupResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetGroup", arg0) + ret := m.ctrl.Call(m, "GetGroup", req) ret0, _ := ret[0].(params.GetGroupResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // GetGroup indicates an expected call of GetGroup. -func (mr *MockJaasAPIClientMockRecorder) GetGroup(arg0 any) *gomock.Call { +func (mr *MockJaasAPIClientMockRecorder) GetGroup(req any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetGroup", reflect.TypeOf((*MockJaasAPIClient)(nil).GetGroup), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetGroup", reflect.TypeOf((*MockJaasAPIClient)(nil).GetGroup), req) } // ListRelationshipTuples mocks base method. -func (m *MockJaasAPIClient) ListRelationshipTuples(arg0 *params.ListRelationshipTuplesRequest) (*params.ListRelationshipTuplesResponse, error) { +func (m *MockJaasAPIClient) ListRelationshipTuples(req *params.ListRelationshipTuplesRequest) (*params.ListRelationshipTuplesResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ListRelationshipTuples", arg0) + ret := m.ctrl.Call(m, "ListRelationshipTuples", req) ret0, _ := ret[0].(*params.ListRelationshipTuplesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // ListRelationshipTuples indicates an expected call of ListRelationshipTuples. -func (mr *MockJaasAPIClientMockRecorder) ListRelationshipTuples(arg0 any) *gomock.Call { +func (mr *MockJaasAPIClientMockRecorder) ListRelationshipTuples(req any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRelationshipTuples", reflect.TypeOf((*MockJaasAPIClient)(nil).ListRelationshipTuples), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRelationshipTuples", reflect.TypeOf((*MockJaasAPIClient)(nil).ListRelationshipTuples), req) } // RemoveGroup mocks base method. -func (m *MockJaasAPIClient) RemoveGroup(arg0 *params.RemoveGroupRequest) error { +func (m *MockJaasAPIClient) RemoveGroup(req *params.RemoveGroupRequest) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveGroup", arg0) + ret := m.ctrl.Call(m, "RemoveGroup", req) ret0, _ := ret[0].(error) return ret0 } // RemoveGroup indicates an expected call of RemoveGroup. -func (mr *MockJaasAPIClientMockRecorder) RemoveGroup(arg0 any) *gomock.Call { +func (mr *MockJaasAPIClientMockRecorder) RemoveGroup(req any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveGroup", reflect.TypeOf((*MockJaasAPIClient)(nil).RemoveGroup), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveGroup", reflect.TypeOf((*MockJaasAPIClient)(nil).RemoveGroup), req) } // RemoveRelation mocks base method. -func (m *MockJaasAPIClient) RemoveRelation(arg0 *params.RemoveRelationRequest) error { +func (m *MockJaasAPIClient) RemoveRelation(req *params.RemoveRelationRequest) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveRelation", arg0) + ret := m.ctrl.Call(m, "RemoveRelation", req) ret0, _ := ret[0].(error) return ret0 } // RemoveRelation indicates an expected call of RemoveRelation. -func (mr *MockJaasAPIClientMockRecorder) RemoveRelation(arg0 any) *gomock.Call { +func (mr *MockJaasAPIClientMockRecorder) RemoveRelation(req any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveRelation", reflect.TypeOf((*MockJaasAPIClient)(nil).RemoveRelation), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveRelation", reflect.TypeOf((*MockJaasAPIClient)(nil).RemoveRelation), req) } // RenameGroup mocks base method. -func (m *MockJaasAPIClient) RenameGroup(arg0 *params.RenameGroupRequest) error { +func (m *MockJaasAPIClient) RenameGroup(req *params.RenameGroupRequest) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RenameGroup", arg0) + ret := m.ctrl.Call(m, "RenameGroup", req) ret0, _ := ret[0].(error) return ret0 } // RenameGroup indicates an expected call of RenameGroup. -func (mr *MockJaasAPIClientMockRecorder) RenameGroup(arg0 any) *gomock.Call { +func (mr *MockJaasAPIClientMockRecorder) RenameGroup(req any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameGroup", reflect.TypeOf((*MockJaasAPIClient)(nil).RenameGroup), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameGroup", reflect.TypeOf((*MockJaasAPIClient)(nil).RenameGroup), req) } // MockKubernetesCloudAPIClient is a mock of KubernetesCloudAPIClient interface. type MockKubernetesCloudAPIClient struct { ctrl *gomock.Controller recorder *MockKubernetesCloudAPIClientMockRecorder + isgomock struct{} } // MockKubernetesCloudAPIClientMockRecorder is the mock recorder for MockKubernetesCloudAPIClient. @@ -880,87 +888,87 @@ func (m *MockKubernetesCloudAPIClient) EXPECT() *MockKubernetesCloudAPIClientMoc } // AddCloud mocks base method. -func (m *MockKubernetesCloudAPIClient) AddCloud(arg0 cloud.Cloud, arg1 bool) error { +func (m *MockKubernetesCloudAPIClient) AddCloud(cloud cloud.Cloud, force bool) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddCloud", arg0, arg1) + ret := m.ctrl.Call(m, "AddCloud", cloud, force) ret0, _ := ret[0].(error) return ret0 } // AddCloud indicates an expected call of AddCloud. -func (mr *MockKubernetesCloudAPIClientMockRecorder) AddCloud(arg0, arg1 any) *gomock.Call { +func (mr *MockKubernetesCloudAPIClientMockRecorder) AddCloud(cloud, force any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCloud", reflect.TypeOf((*MockKubernetesCloudAPIClient)(nil).AddCloud), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCloud", reflect.TypeOf((*MockKubernetesCloudAPIClient)(nil).AddCloud), cloud, force) } // AddCredential mocks base method. -func (m *MockKubernetesCloudAPIClient) AddCredential(arg0 string, arg1 cloud.Credential) error { +func (m *MockKubernetesCloudAPIClient) AddCredential(cloud string, credential cloud.Credential) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddCredential", arg0, arg1) + ret := m.ctrl.Call(m, "AddCredential", cloud, credential) ret0, _ := ret[0].(error) return ret0 } // AddCredential indicates an expected call of AddCredential. -func (mr *MockKubernetesCloudAPIClientMockRecorder) AddCredential(arg0, arg1 any) *gomock.Call { +func (mr *MockKubernetesCloudAPIClientMockRecorder) AddCredential(cloud, credential any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCredential", reflect.TypeOf((*MockKubernetesCloudAPIClient)(nil).AddCredential), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCredential", reflect.TypeOf((*MockKubernetesCloudAPIClient)(nil).AddCredential), cloud, credential) } // Cloud mocks base method. -func (m *MockKubernetesCloudAPIClient) Cloud(arg0 names.CloudTag) (cloud.Cloud, error) { +func (m *MockKubernetesCloudAPIClient) Cloud(tag names.CloudTag) (cloud.Cloud, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Cloud", arg0) + ret := m.ctrl.Call(m, "Cloud", tag) ret0, _ := ret[0].(cloud.Cloud) ret1, _ := ret[1].(error) return ret0, ret1 } // Cloud indicates an expected call of Cloud. -func (mr *MockKubernetesCloudAPIClientMockRecorder) Cloud(arg0 any) *gomock.Call { +func (mr *MockKubernetesCloudAPIClientMockRecorder) Cloud(tag any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockKubernetesCloudAPIClient)(nil).Cloud), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cloud", reflect.TypeOf((*MockKubernetesCloudAPIClient)(nil).Cloud), tag) } // RemoveCloud mocks base method. -func (m *MockKubernetesCloudAPIClient) RemoveCloud(arg0 string) error { +func (m *MockKubernetesCloudAPIClient) RemoveCloud(cloud string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveCloud", arg0) + ret := m.ctrl.Call(m, "RemoveCloud", cloud) ret0, _ := ret[0].(error) return ret0 } // RemoveCloud indicates an expected call of RemoveCloud. -func (mr *MockKubernetesCloudAPIClientMockRecorder) RemoveCloud(arg0 any) *gomock.Call { +func (mr *MockKubernetesCloudAPIClientMockRecorder) RemoveCloud(cloud any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveCloud", reflect.TypeOf((*MockKubernetesCloudAPIClient)(nil).RemoveCloud), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveCloud", reflect.TypeOf((*MockKubernetesCloudAPIClient)(nil).RemoveCloud), cloud) } // UpdateCloud mocks base method. -func (m *MockKubernetesCloudAPIClient) UpdateCloud(arg0 cloud.Cloud) error { +func (m *MockKubernetesCloudAPIClient) UpdateCloud(cloud cloud.Cloud) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateCloud", arg0) + ret := m.ctrl.Call(m, "UpdateCloud", cloud) ret0, _ := ret[0].(error) return ret0 } // UpdateCloud indicates an expected call of UpdateCloud. -func (mr *MockKubernetesCloudAPIClientMockRecorder) UpdateCloud(arg0 any) *gomock.Call { +func (mr *MockKubernetesCloudAPIClientMockRecorder) UpdateCloud(cloud any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCloud", reflect.TypeOf((*MockKubernetesCloudAPIClient)(nil).UpdateCloud), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCloud", reflect.TypeOf((*MockKubernetesCloudAPIClient)(nil).UpdateCloud), cloud) } // UserCredentials mocks base method. -func (m *MockKubernetesCloudAPIClient) UserCredentials(arg0 names.UserTag, arg1 names.CloudTag) ([]names.CloudCredentialTag, error) { +func (m *MockKubernetesCloudAPIClient) UserCredentials(user names.UserTag, cloud names.CloudTag) ([]names.CloudCredentialTag, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UserCredentials", arg0, arg1) + ret := m.ctrl.Call(m, "UserCredentials", user, cloud) ret0, _ := ret[0].([]names.CloudCredentialTag) ret1, _ := ret[1].(error) return ret0, ret1 } // UserCredentials indicates an expected call of UserCredentials. -func (mr *MockKubernetesCloudAPIClientMockRecorder) UserCredentials(arg0, arg1 any) *gomock.Call { +func (mr *MockKubernetesCloudAPIClientMockRecorder) UserCredentials(user, cloud any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserCredentials", reflect.TypeOf((*MockKubernetesCloudAPIClient)(nil).UserCredentials), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserCredentials", reflect.TypeOf((*MockKubernetesCloudAPIClient)(nil).UserCredentials), user, cloud) } From 5662387ef2a167ff80f35f54600fe7a1a4a2782f Mon Sep 17 00:00:00 2001 From: Ales Stimec Date: Mon, 9 Dec 2024 13:16:09 +0100 Subject: [PATCH 2/4] chore: fixes imports --- internal/provider/main_test.go | 2 +- internal/provider/resource_access_jaas_cloud_test.go | 1 + internal/provider/resource_access_jaas_controller_test.go | 1 + internal/provider/resource_access_jaas_group_test.go | 1 + internal/provider/resource_access_jaas_offer_test.go | 1 + internal/provider/resource_access_jaas_service_account_test.go | 1 + internal/provider/resource_application_test.go | 1 - internal/provider/resource_jaas_group_test.go | 1 + internal/provider/resource_kubernetes_cloud.go | 2 ++ internal/provider/resource_kubernetes_cloud_test.go | 3 ++- internal/provider/resource_machine_test.go | 1 + internal/provider/validator_base.go | 1 - internal/provider/validator_resourcekey_test.go | 1 + 13 files changed, 13 insertions(+), 4 deletions(-) diff --git a/internal/provider/main_test.go b/internal/provider/main_test.go index fe93b498..c5aee04e 100644 --- a/internal/provider/main_test.go +++ b/internal/provider/main_test.go @@ -90,6 +90,6 @@ func TestMain(m *testing.M) { if err != nil { panic(err) } else { - m.Run() + os.Exit(m.Run()) } } diff --git a/internal/provider/resource_access_jaas_cloud_test.go b/internal/provider/resource_access_jaas_cloud_test.go index 9511147a..adf1706d 100644 --- a/internal/provider/resource_access_jaas_cloud_test.go +++ b/internal/provider/resource_access_jaas_cloud_test.go @@ -14,6 +14,7 @@ import ( "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/juju/names/v5" + internaltesting "github.com/juju/terraform-provider-juju/internal/testing" ) diff --git a/internal/provider/resource_access_jaas_controller_test.go b/internal/provider/resource_access_jaas_controller_test.go index 804b02cf..5646e0df 100644 --- a/internal/provider/resource_access_jaas_controller_test.go +++ b/internal/provider/resource_access_jaas_controller_test.go @@ -15,6 +15,7 @@ import ( "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/juju/names/v5" + internaltesting "github.com/juju/terraform-provider-juju/internal/testing" ) diff --git a/internal/provider/resource_access_jaas_group_test.go b/internal/provider/resource_access_jaas_group_test.go index 5141f767..d4589f39 100644 --- a/internal/provider/resource_access_jaas_group_test.go +++ b/internal/provider/resource_access_jaas_group_test.go @@ -13,6 +13,7 @@ import ( "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/juju/names/v5" + internaltesting "github.com/juju/terraform-provider-juju/internal/testing" ) diff --git a/internal/provider/resource_access_jaas_offer_test.go b/internal/provider/resource_access_jaas_offer_test.go index 531875b9..9f3ee2ad 100644 --- a/internal/provider/resource_access_jaas_offer_test.go +++ b/internal/provider/resource_access_jaas_offer_test.go @@ -13,6 +13,7 @@ import ( "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/juju/names/v5" + internaltesting "github.com/juju/terraform-provider-juju/internal/testing" ) diff --git a/internal/provider/resource_access_jaas_service_account_test.go b/internal/provider/resource_access_jaas_service_account_test.go index 301debe7..f2aa0d29 100644 --- a/internal/provider/resource_access_jaas_service_account_test.go +++ b/internal/provider/resource_access_jaas_service_account_test.go @@ -13,6 +13,7 @@ import ( "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/juju/names/v5" + internaltesting "github.com/juju/terraform-provider-juju/internal/testing" ) diff --git a/internal/provider/resource_application_test.go b/internal/provider/resource_application_test.go index a931dbb6..9ee587a8 100644 --- a/internal/provider/resource_application_test.go +++ b/internal/provider/resource_application_test.go @@ -14,7 +14,6 @@ import ( "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" - apiapplication "github.com/juju/juju/api/client/application" apiclient "github.com/juju/juju/api/client/client" apispaces "github.com/juju/juju/api/client/spaces" diff --git a/internal/provider/resource_jaas_group_test.go b/internal/provider/resource_jaas_group_test.go index f8a653f1..316c30c4 100644 --- a/internal/provider/resource_jaas_group_test.go +++ b/internal/provider/resource_jaas_group_test.go @@ -12,6 +12,7 @@ import ( "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" + internaltesting "github.com/juju/terraform-provider-juju/internal/testing" ) diff --git a/internal/provider/resource_kubernetes_cloud.go b/internal/provider/resource_kubernetes_cloud.go index 9cea4edd..d7a5858a 100644 --- a/internal/provider/resource_kubernetes_cloud.go +++ b/internal/provider/resource_kubernetes_cloud.go @@ -6,12 +6,14 @@ package provider import ( "context" "fmt" + "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-log/tflog" + "github.com/juju/terraform-provider-juju/internal/juju" ) diff --git a/internal/provider/resource_kubernetes_cloud_test.go b/internal/provider/resource_kubernetes_cloud_test.go index c3fc426b..aa88115a 100644 --- a/internal/provider/resource_kubernetes_cloud_test.go +++ b/internal/provider/resource_kubernetes_cloud_test.go @@ -4,12 +4,13 @@ package provider import ( - internaltesting "github.com/juju/terraform-provider-juju/internal/testing" "os" "testing" "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + + internaltesting "github.com/juju/terraform-provider-juju/internal/testing" ) func TestAcc_ResourceKubernetesCloud(t *testing.T) { diff --git a/internal/provider/resource_machine_test.go b/internal/provider/resource_machine_test.go index 820388fd..9a2fe6d4 100644 --- a/internal/provider/resource_machine_test.go +++ b/internal/provider/resource_machine_test.go @@ -9,6 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + internaltesting "github.com/juju/terraform-provider-juju/internal/testing" ) diff --git a/internal/provider/validator_base.go b/internal/provider/validator_base.go index d0b263a5..c5942eb5 100644 --- a/internal/provider/validator_base.go +++ b/internal/provider/validator_base.go @@ -7,7 +7,6 @@ import ( "context" "github.com/hashicorp/terraform-plugin-framework/schema/validator" - "github.com/juju/juju/core/base" ) diff --git a/internal/provider/validator_resourcekey_test.go b/internal/provider/validator_resourcekey_test.go index 102ef2ae..58514f04 100644 --- a/internal/provider/validator_resourcekey_test.go +++ b/internal/provider/validator_resourcekey_test.go @@ -9,6 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/schema/validator" "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/juju/terraform-provider-juju/internal/provider" ) From 5f21f83d94d89a3e9f1d90d81dc5d74f0b8e8dd4 Mon Sep 17 00:00:00 2001 From: Ales Stimec Date: Mon, 9 Dec 2024 14:28:24 +0100 Subject: [PATCH 3/4] chore: replaces jameinel-ubuntu-lite with the ubuntu-lite charm in tests --- .../provider/resource_access_secret_test.go | 4 ++-- .../provider/resource_application_test.go | 20 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/provider/resource_access_secret_test.go b/internal/provider/resource_access_secret_test.go index 3e4253e8..04e0b355 100644 --- a/internal/provider/resource_access_secret_test.go +++ b/internal/provider/resource_access_secret_test.go @@ -101,7 +101,7 @@ resource "juju_application" "jul" { model = juju_model.{{.ModelName}}.name charm { - name = "jameinel-ubuntu-lite" + name = "ubuntu-lite" channel = "latest/stable" } @@ -113,7 +113,7 @@ resource "juju_application" "jul2" { model = juju_model.{{.ModelName}}.name charm { - name = "jameinel-ubuntu-lite" + name = "ubuntu-lite" channel = "latest/stable" } diff --git a/internal/provider/resource_application_test.go b/internal/provider/resource_application_test.go index 9ee587a8..89cf2a3d 100644 --- a/internal/provider/resource_application_test.go +++ b/internal/provider/resource_application_test.go @@ -39,7 +39,7 @@ func TestAcc_ResourceApplication(t *testing.T) { resource.TestCheckResourceAttr("juju_application.this", "model", modelName), resource.TestCheckResourceAttr("juju_application.this", "name", appName), resource.TestCheckResourceAttr("juju_application.this", "charm.#", "1"), - resource.TestCheckResourceAttr("juju_application.this", "charm.0.name", "jameinel-ubuntu-lite"), + resource.TestCheckResourceAttr("juju_application.this", "charm.0.name", "ubuntu-lite"), resource.TestCheckResourceAttr("juju_application.this", "trust", "true"), resource.TestCheckResourceAttr("juju_application.this", "expose.#", "1"), resource.TestCheckNoResourceAttr("juju_application.this", "storage"), @@ -93,7 +93,7 @@ func TestAcc_ResourceApplication(t *testing.T) { func TestAcc_ResourceApplication_Updates(t *testing.T) { modelName := acctest.RandomWithPrefix("tf-test-application") - appName := "jameinel-ubuntu-lite" + appName := "ubuntu-lite" if testingCloud != LXDCloudTesting { appName = "hello-kubecon" } @@ -622,7 +622,7 @@ func TestAcc_ResourceApplication_UpgradeProvider(t *testing.T) { resource.TestCheckResourceAttr("juju_application.this", "model", modelName), resource.TestCheckResourceAttr("juju_application.this", "name", appName), resource.TestCheckResourceAttr("juju_application.this", "charm.#", "1"), - resource.TestCheckResourceAttr("juju_application.this", "charm.0.name", "jameinel-ubuntu-lite"), + resource.TestCheckResourceAttr("juju_application.this", "charm.0.name", "ubuntu-lite"), resource.TestCheckResourceAttr("juju_application.this", "trust", "true"), resource.TestCheckResourceAttr("juju_application.this", "expose.#", "1"), ), @@ -819,7 +819,7 @@ func testAccResourceApplicationBasic(modelName, appName string) string { model = juju_model.this.name name = %q charm { - name = "jameinel-ubuntu-lite" + name = "ubuntu-lite" } trust = true expose{} @@ -836,7 +836,7 @@ func testAccResourceApplicationBasic(modelName, appName string) string { model = juju_model.this.name name = %q charm { - name = "jameinel-ubuntu-lite" + name = "ubuntu-lite" } trust = true expose{} @@ -954,7 +954,7 @@ func testAccResourceApplicationUpdates(modelName string, units int, expose bool, units = %d name = "test-app" charm { - name = "jameinel-ubuntu-lite" + name = "ubuntu-lite" } trust = true %s @@ -1036,7 +1036,7 @@ resource "juju_application" "this" { units = 0 name = "test-app" charm { - name = "jameinel-ubuntu-lite" + name = "ubuntu-lite" revision = 10 } @@ -1055,7 +1055,7 @@ resource "juju_application" "this" { model = juju_model.this.name name = "test-app" charm { - name = "jameinel-ubuntu-lite" + name = "ubuntu-lite" revision = 10 } trust = true @@ -1096,7 +1096,7 @@ resource "juju_application" "this" { units = 0 name = "test-app" charm { - name = "jameinel-ubuntu-lite" + name = "ubuntu-lite" revision = 10 } trust = true @@ -1190,7 +1190,7 @@ resource "juju_application" "{{.AppName}}" { name = "{{.AppName}}" constraints = "{{.Constraints}}" charm { - name = "jameinel-ubuntu-lite" + name = "ubuntu-lite" revision = 10 } endpoint_bindings = {{.EndpointBindings}} From 7aa9248c7c505f27a0c829109af774c366f1a070 Mon Sep 17 00:00:00 2001 From: Ales Stimec Date: Mon, 9 Dec 2024 14:49:42 +0100 Subject: [PATCH 4/4] chore: updates golangci-lint version --- .github/workflows/static-analysis.yaml | 2 +- .github/workflows/test_integration.yml | 2 +- internal/provider/resource_application_test.go | 10 +++++----- tools/static-analysis.sh | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/static-analysis.yaml b/.github/workflows/static-analysis.yaml index 35b52d67..c43a40cc 100644 --- a/.github/workflows/static-analysis.yaml +++ b/.github/workflows/static-analysis.yaml @@ -75,7 +75,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: - version: v1.54.0 + version: v1.61.0 args: --print-issued-lines=true # This runs copyright-check against the codebase diff --git a/.github/workflows/test_integration.yml b/.github/workflows/test_integration.yml index 7ec40b17..f75fca2a 100644 --- a/.github/workflows/test_integration.yml +++ b/.github/workflows/test_integration.yml @@ -102,7 +102,7 @@ jobs: - env: TF_ACC: "1" TEST_CLOUD: ${{ matrix.action-operator.cloud }} - run: go test -parallel 10 -timeout 40m -v -cover ./internal/provider/ + run: go test -parallel 1 -timeout 60m -v -cover ./internal/provider/ timeout-minutes: 40 # Run acceptance tests in a matrix with Terraform CLI versions diff --git a/internal/provider/resource_application_test.go b/internal/provider/resource_application_test.go index 89cf2a3d..2479a903 100644 --- a/internal/provider/resource_application_test.go +++ b/internal/provider/resource_application_test.go @@ -132,7 +132,7 @@ func TestAcc_ResourceApplication_Updates(t *testing.T) { return testingCloud != LXDCloudTesting, nil }, Config: testAccResourceApplicationUpdates(modelName, 2, true, "machinename"), - Check: resource.TestCheckResourceAttr("juju_application.this", "charm.0.revision", "10"), + Check: resource.TestCheckResourceAttr("juju_application.this", "charm.0.revision", "2"), }, { SkipFunc: func() (bool, error) { @@ -1037,7 +1037,7 @@ resource "juju_application" "this" { name = "test-app" charm { name = "ubuntu-lite" - revision = 10 + revision = 2 } trust = true @@ -1056,7 +1056,7 @@ resource "juju_application" "this" { name = "test-app" charm { name = "ubuntu-lite" - revision = 10 + revision = 2 } trust = true expose{} @@ -1097,7 +1097,7 @@ resource "juju_application" "this" { name = "test-app" charm { name = "ubuntu-lite" - revision = 10 + revision = 2 } trust = true expose{} @@ -1191,7 +1191,7 @@ resource "juju_application" "{{.AppName}}" { constraints = "{{.Constraints}}" charm { name = "ubuntu-lite" - revision = 10 + revision = 2 } endpoint_bindings = {{.EndpointBindings}} } diff --git a/tools/static-analysis.sh b/tools/static-analysis.sh index b1aa07d2..092502d5 100755 --- a/tools/static-analysis.sh +++ b/tools/static-analysis.sh @@ -118,8 +118,8 @@ run_linter() { run_go() { VER=$(golangci-lint --version | tr -s ' ' | cut -d ' ' -f 4 | cut -d '.' -f 1,2) - if [[ ${VER} != "1.53" ]] && [[ ${VER} != "v1.53" ]]; then - (echo >&2 -e '\nError: golangci-lint version does not match 1.53. Please upgrade/downgrade to the right version.') + if [[ ${VER} != "1.61.0" ]] && [[ ${VER} != "v1.61.0" ]]; then + (echo >&2 -e '\nError: golangci-lint version does not match 1.61.0. Please upgrade/downgrade to the right version.') exit 1 fi OUT=$(golangci-lint run -c .github/golangci-lint.config.yaml 2>&1)