diff --git a/Taskfile.yml b/Taskfile.yml index 16a3eaaf..9e35e200 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -6,7 +6,7 @@ vars: BINARY_FOLDER: bin BINARY_NAME: terraform-provider-qovery GOLANGCI_LINT_VERSION: v1.63.1 - MOCKERY_VERSION: v2.22.1 + MOCKERY_VERSION: v2.50.2 dotenv: ['.env'] diff --git a/go.mod b/go.mod index cb09b8ca..73ac294a 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/qovery/terraform-provider-qovery -go 1.22.7 +go 1.23 toolchain go1.23.4 @@ -40,6 +40,7 @@ require ( github.com/cloudflare/circl v1.3.7 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fatih/color v1.16.0 // indirect + github.com/frankban/quicktest v1.14.4 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/golang/protobuf v1.5.4 // indirect @@ -63,8 +64,9 @@ require ( github.com/hashicorp/terraform-registry-address v0.2.2 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect - github.com/huandu/xstrings v1.3.3 // indirect + github.com/huandu/xstrings v1.4.0 // indirect github.com/imdario/mergo v0.3.15 // indirect + github.com/kr/pretty v0.3.1 // indirect github.com/leodido/go-urn v1.2.1 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect @@ -89,11 +91,11 @@ 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.22.0 // indirect + golang.org/x/crypto v0.24.0 // indirect golang.org/x/mod v0.21.0 // indirect - golang.org/x/net v0.24.0 // indirect + golang.org/x/net v0.26.0 // indirect golang.org/x/sys v0.21.0 // indirect - golang.org/x/term v0.19.0 // indirect + golang.org/x/term v0.21.0 // indirect golang.org/x/text v0.20.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect diff --git a/go.sum b/go.sum index 72b73dcf..88027f6c 100644 --- a/go.sum +++ b/go.sum @@ -35,6 +35,7 @@ github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZ github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -45,8 +46,8 @@ github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FM github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= -github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= @@ -72,6 +73,7 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -129,8 +131,9 @@ github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= +github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= @@ -142,8 +145,8 @@ github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1 github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -182,21 +185,19 @@ github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/qovery/qovery-client-go v0.0.0-20241203095515-b7bfff7f6c11 h1:racjGI7jQTgKOZTrYFGwCtceW3aMhfCKQZdpjVENZqM= -github.com/qovery/qovery-client-go v0.0.0-20241203095515-b7bfff7f6c11/go.mod h1:hAMMDu1kk2rNJRf8MiYV0E+07DhDXpvNddj9q8YpbFs= -github.com/qovery/qovery-client-go v0.0.0-20241227140826-136a47d7533e h1:w9D5Z6b/8XpIPwICCbAqctOkFRIMZdI5tNJ6pWOHgYM= -github.com/qovery/qovery-client-go v0.0.0-20241227140826-136a47d7533e/go.mod h1:hAMMDu1kk2rNJRf8MiYV0E+07DhDXpvNddj9q8YpbFs= github.com/qovery/qovery-client-go v0.0.0-20241230103349-8c3d9c7232b5 h1:ggsdjhn0OYdbanDMJaAMVkuA4JHQYbeOg78enQiGfo4= github.com/qovery/qovery-client-go v0.0.0-20241230103349-8c3d9c7232b5/go.mod h1:hAMMDu1kk2rNJRf8MiYV0E+07DhDXpvNddj9q8YpbFs= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw= github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/schollz/progressbar/v3 v3.13.0 h1:9TeeWRcjW2qd05I8Kf9knPkW4vLM/hYoa6z9ABvxje8= @@ -245,8 +246,8 @@ go.abhg.dev/goldmark/frontmatter v0.2.0/go.mod h1:XqrEkZuM57djk7zrlRUB02x8I5J0px golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 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.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME= golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -257,8 +258,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL 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.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/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-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -284,8 +285,8 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn 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.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= -golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= +golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= 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= diff --git a/internal/application/services/mocks_test/deployment_service_mock.go b/internal/application/services/mocks_test/deployment_service_mock.go index 78f49f58..b9581782 100644 --- a/internal/application/services/mocks_test/deployment_service_mock.go +++ b/internal/application/services/mocks_test/deployment_service_mock.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_test @@ -27,6 +27,10 @@ func (_m *DeploymentService) EXPECT() *DeploymentService_Expecter { func (_m *DeploymentService) Deploy(ctx context.Context, resourceID string, version string) (*status.Status, error) { ret := _m.Called(ctx, resourceID, version) + if len(ret) == 0 { + panic("no return value specified for Deploy") + } + var r0 *status.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*status.Status, error)); ok { @@ -83,6 +87,10 @@ func (_c *DeploymentService_Deploy_Call) RunAndReturn(run func(context.Context, func (_m *DeploymentService) GetStatus(ctx context.Context, resourceID string) (*status.Status, error) { ret := _m.Called(ctx, resourceID) + if len(ret) == 0 { + panic("no return value specified for GetStatus") + } + var r0 *status.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*status.Status, error)); ok { @@ -138,6 +146,10 @@ func (_c *DeploymentService_GetStatus_Call) RunAndReturn(run func(context.Contex func (_m *DeploymentService) Redeploy(ctx context.Context, resourceID string) (*status.Status, error) { ret := _m.Called(ctx, resourceID) + if len(ret) == 0 { + panic("no return value specified for Redeploy") + } + var r0 *status.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*status.Status, error)); ok { @@ -193,6 +205,10 @@ func (_c *DeploymentService_Redeploy_Call) RunAndReturn(run func(context.Context func (_m *DeploymentService) Stop(ctx context.Context, resourceID string) (*status.Status, error) { ret := _m.Called(ctx, resourceID) + if len(ret) == 0 { + panic("no return value specified for Stop") + } + var r0 *status.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*status.Status, error)); ok { @@ -248,6 +264,10 @@ func (_c *DeploymentService_Stop_Call) RunAndReturn(run func(context.Context, st func (_m *DeploymentService) UpdateState(ctx context.Context, resourceID string, desiredState status.State, version string) (*status.Status, error) { ret := _m.Called(ctx, resourceID, desiredState, version) + if len(ret) == 0 { + panic("no return value specified for UpdateState") + } + var r0 *status.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, status.State, string) (*status.Status, error)); ok { @@ -301,13 +321,12 @@ func (_c *DeploymentService_UpdateState_Call) RunAndReturn(run func(context.Cont return _c } -type mockConstructorTestingTNewDeploymentService interface { +// NewDeploymentService creates a new instance of DeploymentService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewDeploymentService(t interface { mock.TestingT Cleanup(func()) -} - -// NewDeploymentService creates a new instance of DeploymentService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewDeploymentService(t mockConstructorTestingTNewDeploymentService) *DeploymentService { +}) *DeploymentService { mock := &DeploymentService{} mock.Mock.Test(t) diff --git a/internal/application/services/mocks_test/secret_service_mock.go b/internal/application/services/mocks_test/secret_service_mock.go index 7e79d56b..714556f8 100644 --- a/internal/application/services/mocks_test/secret_service_mock.go +++ b/internal/application/services/mocks_test/secret_service_mock.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_test @@ -28,6 +28,10 @@ func (_m *SecretService) EXPECT() *SecretService_Expecter { func (_m *SecretService) List(ctx context.Context, scopeResourceID string) (secret.Secrets, error) { ret := _m.Called(ctx, scopeResourceID) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 secret.Secrets var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (secret.Secrets, error)); ok { @@ -83,6 +87,10 @@ func (_c *SecretService_List_Call) RunAndReturn(run func(context.Context, string func (_m *SecretService) Update(ctx context.Context, scopeResourceID string, secretsRequest secret.DiffRequest, secretAliasesRequest secret.DiffRequest, secretOverridesRequest secret.DiffRequest, overrideAuthorizedScopes map[variable.Scope]struct{}) (secret.Secrets, error) { ret := _m.Called(ctx, scopeResourceID, secretsRequest, secretAliasesRequest, secretOverridesRequest, overrideAuthorizedScopes) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 secret.Secrets var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, secret.DiffRequest, secret.DiffRequest, secret.DiffRequest, map[variable.Scope]struct{}) (secret.Secrets, error)); ok { @@ -138,13 +146,12 @@ func (_c *SecretService_Update_Call) RunAndReturn(run func(context.Context, stri return _c } -type mockConstructorTestingTNewSecretService interface { +// NewSecretService creates a new instance of SecretService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewSecretService(t interface { mock.TestingT Cleanup(func()) -} - -// NewSecretService creates a new instance of SecretService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSecretService(t mockConstructorTestingTNewSecretService) *SecretService { +}) *SecretService { mock := &SecretService{} mock.Mock.Test(t) diff --git a/internal/application/services/mocks_test/variable_service_mock.go b/internal/application/services/mocks_test/variable_service_mock.go index c1cf96b6..424b8aee 100644 --- a/internal/application/services/mocks_test/variable_service_mock.go +++ b/internal/application/services/mocks_test/variable_service_mock.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_test @@ -26,6 +26,10 @@ func (_m *VariableService) EXPECT() *VariableService_Expecter { func (_m *VariableService) List(ctx context.Context, scopeResourceID string) (variable.Variables, error) { ret := _m.Called(ctx, scopeResourceID) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 variable.Variables var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (variable.Variables, error)); ok { @@ -81,6 +85,10 @@ func (_c *VariableService_List_Call) RunAndReturn(run func(context.Context, stri func (_m *VariableService) Update(ctx context.Context, scopeResourceID string, environmentVariablesRequest variable.DiffRequest, environmentVariableAliasesRequest variable.DiffRequest, environmentVariableOverridesRequest variable.DiffRequest, overrideAuthorizedScopes map[variable.Scope]struct{}) (variable.Variables, error) { ret := _m.Called(ctx, scopeResourceID, environmentVariablesRequest, environmentVariableAliasesRequest, environmentVariableOverridesRequest, overrideAuthorizedScopes) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 variable.Variables var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, variable.DiffRequest, variable.DiffRequest, variable.DiffRequest, map[variable.Scope]struct{}) (variable.Variables, error)); ok { @@ -136,13 +144,12 @@ func (_c *VariableService_Update_Call) RunAndReturn(run func(context.Context, st return _c } -type mockConstructorTestingTNewVariableService interface { +// NewVariableService creates a new instance of VariableService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewVariableService(t interface { mock.TestingT Cleanup(func()) -} - -// NewVariableService creates a new instance of VariableService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVariableService(t mockConstructorTestingTNewVariableService) *VariableService { +}) *VariableService { mock := &VariableService{} mock.Mock.Test(t) diff --git a/internal/infrastructure/repositories/mocks_test/container_repository_mock.go b/internal/infrastructure/repositories/mocks_test/container_repository_mock.go index c66ddc95..2498f5a6 100644 --- a/internal/infrastructure/repositories/mocks_test/container_repository_mock.go +++ b/internal/infrastructure/repositories/mocks_test/container_repository_mock.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_test @@ -27,6 +27,10 @@ func (_m *ContainerRepository) EXPECT() *ContainerRepository_Expecter { func (_m *ContainerRepository) Create(ctx context.Context, environmentID string, request container.UpsertRepositoryRequest) (*container.Container, error) { ret := _m.Called(ctx, environmentID, request) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *container.Container var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, container.UpsertRepositoryRequest) (*container.Container, error)); ok { @@ -83,6 +87,10 @@ func (_c *ContainerRepository_Create_Call) RunAndReturn(run func(context.Context func (_m *ContainerRepository) Delete(ctx context.Context, containerID string) error { ret := _m.Called(ctx, containerID) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, containerID) @@ -126,6 +134,10 @@ func (_c *ContainerRepository_Delete_Call) RunAndReturn(run func(context.Context func (_m *ContainerRepository) Get(ctx context.Context, containerID string, advancedSettingsJsonFromState string, isTriggeredFromImport bool) (*container.Container, error) { ret := _m.Called(ctx, containerID, advancedSettingsJsonFromState, isTriggeredFromImport) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *container.Container var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, bool) (*container.Container, error)); ok { @@ -183,6 +195,10 @@ func (_c *ContainerRepository_Get_Call) RunAndReturn(run func(context.Context, s func (_m *ContainerRepository) Update(ctx context.Context, containerID string, request container.UpsertRepositoryRequest) (*container.Container, error) { ret := _m.Called(ctx, containerID, request) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *container.Container var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, container.UpsertRepositoryRequest) (*container.Container, error)); ok { @@ -235,13 +251,12 @@ func (_c *ContainerRepository_Update_Call) RunAndReturn(run func(context.Context return _c } -type mockConstructorTestingTNewContainerRepository interface { +// NewContainerRepository creates a new instance of ContainerRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewContainerRepository(t interface { mock.TestingT Cleanup(func()) -} - -// NewContainerRepository creates a new instance of ContainerRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewContainerRepository(t mockConstructorTestingTNewContainerRepository) *ContainerRepository { +}) *ContainerRepository { mock := &ContainerRepository{} mock.Mock.Test(t) diff --git a/internal/infrastructure/repositories/mocks_test/credentials_aws_repository_mock.go b/internal/infrastructure/repositories/mocks_test/credentials_aws_repository_mock.go index 9d57a82a..33157722 100644 --- a/internal/infrastructure/repositories/mocks_test/credentials_aws_repository_mock.go +++ b/internal/infrastructure/repositories/mocks_test/credentials_aws_repository_mock.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_test @@ -26,6 +26,10 @@ func (_m *CredentialsAwsRepository) EXPECT() *CredentialsAwsRepository_Expecter func (_m *CredentialsAwsRepository) Create(ctx context.Context, organizationID string, request credentials.UpsertAwsRequest) (*credentials.Credentials, error) { ret := _m.Called(ctx, organizationID, request) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *credentials.Credentials var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, credentials.UpsertAwsRequest) (*credentials.Credentials, error)); ok { @@ -82,6 +86,10 @@ func (_c *CredentialsAwsRepository_Create_Call) RunAndReturn(run func(context.Co func (_m *CredentialsAwsRepository) Delete(ctx context.Context, organizationID string, credentialsID string) error { ret := _m.Called(ctx, organizationID, credentialsID) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = rf(ctx, organizationID, credentialsID) @@ -126,6 +134,10 @@ func (_c *CredentialsAwsRepository_Delete_Call) RunAndReturn(run func(context.Co func (_m *CredentialsAwsRepository) Get(ctx context.Context, organizationID string, credentialsID string) (*credentials.Credentials, error) { ret := _m.Called(ctx, organizationID, credentialsID) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *credentials.Credentials var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*credentials.Credentials, error)); ok { @@ -182,6 +194,10 @@ func (_c *CredentialsAwsRepository_Get_Call) RunAndReturn(run func(context.Conte func (_m *CredentialsAwsRepository) Update(ctx context.Context, organizationID string, credentialsID string, request credentials.UpsertAwsRequest) (*credentials.Credentials, error) { ret := _m.Called(ctx, organizationID, credentialsID, request) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *credentials.Credentials var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, credentials.UpsertAwsRequest) (*credentials.Credentials, error)); ok { @@ -235,13 +251,12 @@ func (_c *CredentialsAwsRepository_Update_Call) RunAndReturn(run func(context.Co return _c } -type mockConstructorTestingTNewCredentialsAwsRepository interface { +// NewCredentialsAwsRepository creates a new instance of CredentialsAwsRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewCredentialsAwsRepository(t interface { mock.TestingT Cleanup(func()) -} - -// NewCredentialsAwsRepository creates a new instance of CredentialsAwsRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCredentialsAwsRepository(t mockConstructorTestingTNewCredentialsAwsRepository) *CredentialsAwsRepository { +}) *CredentialsAwsRepository { mock := &CredentialsAwsRepository{} mock.Mock.Test(t) diff --git a/internal/infrastructure/repositories/mocks_test/credentials_scaleway_repository_mock.go b/internal/infrastructure/repositories/mocks_test/credentials_scaleway_repository_mock.go index c91e660f..5f27a729 100644 --- a/internal/infrastructure/repositories/mocks_test/credentials_scaleway_repository_mock.go +++ b/internal/infrastructure/repositories/mocks_test/credentials_scaleway_repository_mock.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_test @@ -26,6 +26,10 @@ func (_m *CredentialsScalewayRepository) EXPECT() *CredentialsScalewayRepository func (_m *CredentialsScalewayRepository) Create(ctx context.Context, organizationID string, request credentials.UpsertScalewayRequest) (*credentials.Credentials, error) { ret := _m.Called(ctx, organizationID, request) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *credentials.Credentials var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, credentials.UpsertScalewayRequest) (*credentials.Credentials, error)); ok { @@ -82,6 +86,10 @@ func (_c *CredentialsScalewayRepository_Create_Call) RunAndReturn(run func(conte func (_m *CredentialsScalewayRepository) Delete(ctx context.Context, organizationID string, credentialsID string) error { ret := _m.Called(ctx, organizationID, credentialsID) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = rf(ctx, organizationID, credentialsID) @@ -126,6 +134,10 @@ func (_c *CredentialsScalewayRepository_Delete_Call) RunAndReturn(run func(conte func (_m *CredentialsScalewayRepository) Get(ctx context.Context, organizationID string, credentialsID string) (*credentials.Credentials, error) { ret := _m.Called(ctx, organizationID, credentialsID) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *credentials.Credentials var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*credentials.Credentials, error)); ok { @@ -182,6 +194,10 @@ func (_c *CredentialsScalewayRepository_Get_Call) RunAndReturn(run func(context. func (_m *CredentialsScalewayRepository) Update(ctx context.Context, organizationID string, credentialsID string, request credentials.UpsertScalewayRequest) (*credentials.Credentials, error) { ret := _m.Called(ctx, organizationID, credentialsID, request) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *credentials.Credentials var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, credentials.UpsertScalewayRequest) (*credentials.Credentials, error)); ok { @@ -235,13 +251,12 @@ func (_c *CredentialsScalewayRepository_Update_Call) RunAndReturn(run func(conte return _c } -type mockConstructorTestingTNewCredentialsScalewayRepository interface { +// NewCredentialsScalewayRepository creates a new instance of CredentialsScalewayRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewCredentialsScalewayRepository(t interface { mock.TestingT Cleanup(func()) -} - -// NewCredentialsScalewayRepository creates a new instance of CredentialsScalewayRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCredentialsScalewayRepository(t mockConstructorTestingTNewCredentialsScalewayRepository) *CredentialsScalewayRepository { +}) *CredentialsScalewayRepository { mock := &CredentialsScalewayRepository{} mock.Mock.Test(t) diff --git a/internal/infrastructure/repositories/mocks_test/deployment_repository_mock.go b/internal/infrastructure/repositories/mocks_test/deployment_repository_mock.go index 583a1384..9100b164 100644 --- a/internal/infrastructure/repositories/mocks_test/deployment_repository_mock.go +++ b/internal/infrastructure/repositories/mocks_test/deployment_repository_mock.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_test @@ -27,6 +27,10 @@ func (_m *DeploymentRepository) EXPECT() *DeploymentRepository_Expecter { func (_m *DeploymentRepository) Deploy(ctx context.Context, resourceID string, version string) (*status.Status, error) { ret := _m.Called(ctx, resourceID, version) + if len(ret) == 0 { + panic("no return value specified for Deploy") + } + var r0 *status.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*status.Status, error)); ok { @@ -83,6 +87,10 @@ func (_c *DeploymentRepository_Deploy_Call) RunAndReturn(run func(context.Contex func (_m *DeploymentRepository) GetStatus(ctx context.Context, resourceID string) (*status.Status, error) { ret := _m.Called(ctx, resourceID) + if len(ret) == 0 { + panic("no return value specified for GetStatus") + } + var r0 *status.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*status.Status, error)); ok { @@ -138,6 +146,10 @@ func (_c *DeploymentRepository_GetStatus_Call) RunAndReturn(run func(context.Con func (_m *DeploymentRepository) Redeploy(ctx context.Context, resourceID string) (*status.Status, error) { ret := _m.Called(ctx, resourceID) + if len(ret) == 0 { + panic("no return value specified for Redeploy") + } + var r0 *status.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*status.Status, error)); ok { @@ -193,6 +205,10 @@ func (_c *DeploymentRepository_Redeploy_Call) RunAndReturn(run func(context.Cont func (_m *DeploymentRepository) Stop(ctx context.Context, resourceID string) (*status.Status, error) { ret := _m.Called(ctx, resourceID) + if len(ret) == 0 { + panic("no return value specified for Stop") + } + var r0 *status.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*status.Status, error)); ok { @@ -244,13 +260,12 @@ func (_c *DeploymentRepository_Stop_Call) RunAndReturn(run func(context.Context, return _c } -type mockConstructorTestingTNewDeploymentRepository interface { +// NewDeploymentRepository creates a new instance of DeploymentRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewDeploymentRepository(t interface { mock.TestingT Cleanup(func()) -} - -// NewDeploymentRepository creates a new instance of DeploymentRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewDeploymentRepository(t mockConstructorTestingTNewDeploymentRepository) *DeploymentRepository { +}) *DeploymentRepository { mock := &DeploymentRepository{} mock.Mock.Test(t) diff --git a/internal/infrastructure/repositories/mocks_test/environment_repository_mock.go b/internal/infrastructure/repositories/mocks_test/environment_repository_mock.go index bf62dd5e..1435da8e 100644 --- a/internal/infrastructure/repositories/mocks_test/environment_repository_mock.go +++ b/internal/infrastructure/repositories/mocks_test/environment_repository_mock.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_test @@ -26,6 +26,10 @@ func (_m *EnvironmentRepository) EXPECT() *EnvironmentRepository_Expecter { func (_m *EnvironmentRepository) Create(ctx context.Context, projectID string, request environment.CreateRepositoryRequest) (*environment.Environment, error) { ret := _m.Called(ctx, projectID, request) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *environment.Environment var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, environment.CreateRepositoryRequest) (*environment.Environment, error)); ok { @@ -82,6 +86,10 @@ func (_c *EnvironmentRepository_Create_Call) RunAndReturn(run func(context.Conte func (_m *EnvironmentRepository) Delete(ctx context.Context, environmentID string) error { ret := _m.Called(ctx, environmentID) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, environmentID) @@ -125,6 +133,10 @@ func (_c *EnvironmentRepository_Delete_Call) RunAndReturn(run func(context.Conte func (_m *EnvironmentRepository) Exists(ctx context.Context, environmentId string) bool { ret := _m.Called(ctx, environmentId) + if len(ret) == 0 { + panic("no return value specified for Exists") + } + var r0 bool if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok { r0 = rf(ctx, environmentId) @@ -168,6 +180,10 @@ func (_c *EnvironmentRepository_Exists_Call) RunAndReturn(run func(context.Conte func (_m *EnvironmentRepository) Get(ctx context.Context, environmentID string) (*environment.Environment, error) { ret := _m.Called(ctx, environmentID) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *environment.Environment var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*environment.Environment, error)); ok { @@ -223,6 +239,10 @@ func (_c *EnvironmentRepository_Get_Call) RunAndReturn(run func(context.Context, func (_m *EnvironmentRepository) Update(ctx context.Context, environmentID string, request environment.UpdateRepositoryRequest) (*environment.Environment, error) { ret := _m.Called(ctx, environmentID, request) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *environment.Environment var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, environment.UpdateRepositoryRequest) (*environment.Environment, error)); ok { @@ -275,13 +295,12 @@ func (_c *EnvironmentRepository_Update_Call) RunAndReturn(run func(context.Conte return _c } -type mockConstructorTestingTNewEnvironmentRepository interface { +// NewEnvironmentRepository creates a new instance of EnvironmentRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewEnvironmentRepository(t interface { mock.TestingT Cleanup(func()) -} - -// NewEnvironmentRepository creates a new instance of EnvironmentRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEnvironmentRepository(t mockConstructorTestingTNewEnvironmentRepository) *EnvironmentRepository { +}) *EnvironmentRepository { mock := &EnvironmentRepository{} mock.Mock.Test(t) diff --git a/internal/infrastructure/repositories/mocks_test/helm_repository_mock.go b/internal/infrastructure/repositories/mocks_test/helm_repository_mock.go index 04ff6033..3da92805 100644 --- a/internal/infrastructure/repositories/mocks_test/helm_repository_mock.go +++ b/internal/infrastructure/repositories/mocks_test/helm_repository_mock.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_test @@ -26,6 +26,10 @@ func (_m *HelmRepository) EXPECT() *HelmRepository_Expecter { func (_m *HelmRepository) Create(ctx context.Context, environmentID string, request helm.UpsertRepositoryRequest) (*helm.Helm, error) { ret := _m.Called(ctx, environmentID, request) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *helm.Helm var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, helm.UpsertRepositoryRequest) (*helm.Helm, error)); ok { @@ -82,6 +86,10 @@ func (_c *HelmRepository_Create_Call) RunAndReturn(run func(context.Context, str func (_m *HelmRepository) Delete(ctx context.Context, helmID string) error { ret := _m.Called(ctx, helmID) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, helmID) @@ -125,6 +133,10 @@ func (_c *HelmRepository_Delete_Call) RunAndReturn(run func(context.Context, str func (_m *HelmRepository) Get(ctx context.Context, helmID string, advancedSettingsJsonFromState string, isTriggeredFromImport bool) (*helm.Helm, error) { ret := _m.Called(ctx, helmID, advancedSettingsJsonFromState, isTriggeredFromImport) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *helm.Helm var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, bool) (*helm.Helm, error)); ok { @@ -182,6 +194,10 @@ func (_c *HelmRepository_Get_Call) RunAndReturn(run func(context.Context, string func (_m *HelmRepository) Update(ctx context.Context, helmID string, request helm.UpsertRepositoryRequest) (*helm.Helm, error) { ret := _m.Called(ctx, helmID, request) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *helm.Helm var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, helm.UpsertRepositoryRequest) (*helm.Helm, error)); ok { @@ -234,13 +250,12 @@ func (_c *HelmRepository_Update_Call) RunAndReturn(run func(context.Context, str return _c } -type mockConstructorTestingTNewHelmRepository interface { +// NewHelmRepository creates a new instance of HelmRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewHelmRepository(t interface { mock.TestingT Cleanup(func()) -} - -// NewHelmRepository creates a new instance of HelmRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewHelmRepository(t mockConstructorTestingTNewHelmRepository) *HelmRepository { +}) *HelmRepository { mock := &HelmRepository{} mock.Mock.Test(t) diff --git a/internal/infrastructure/repositories/mocks_test/job_repository_mock.go b/internal/infrastructure/repositories/mocks_test/job_repository_mock.go index 4cca43d8..8ae5eded 100644 --- a/internal/infrastructure/repositories/mocks_test/job_repository_mock.go +++ b/internal/infrastructure/repositories/mocks_test/job_repository_mock.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_test @@ -26,6 +26,10 @@ func (_m *JobRepository) EXPECT() *JobRepository_Expecter { func (_m *JobRepository) Create(ctx context.Context, environmentID string, request job.UpsertRepositoryRequest) (*job.Job, error) { ret := _m.Called(ctx, environmentID, request) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *job.Job var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, job.UpsertRepositoryRequest) (*job.Job, error)); ok { @@ -82,6 +86,10 @@ func (_c *JobRepository_Create_Call) RunAndReturn(run func(context.Context, stri func (_m *JobRepository) Delete(ctx context.Context, jobID string) error { ret := _m.Called(ctx, jobID) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, jobID) @@ -125,6 +133,10 @@ func (_c *JobRepository_Delete_Call) RunAndReturn(run func(context.Context, stri func (_m *JobRepository) Get(ctx context.Context, jobID string, advancedSettingsJsonFromState string, isTriggeredFromImport bool) (*job.Job, error) { ret := _m.Called(ctx, jobID, advancedSettingsJsonFromState, isTriggeredFromImport) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *job.Job var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, bool) (*job.Job, error)); ok { @@ -182,6 +194,10 @@ func (_c *JobRepository_Get_Call) RunAndReturn(run func(context.Context, string, func (_m *JobRepository) Update(ctx context.Context, jobID string, request job.UpsertRepositoryRequest) (*job.Job, error) { ret := _m.Called(ctx, jobID, request) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *job.Job var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, job.UpsertRepositoryRequest) (*job.Job, error)); ok { @@ -234,13 +250,12 @@ func (_c *JobRepository_Update_Call) RunAndReturn(run func(context.Context, stri return _c } -type mockConstructorTestingTNewJobRepository interface { +// NewJobRepository creates a new instance of JobRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewJobRepository(t interface { mock.TestingT Cleanup(func()) -} - -// NewJobRepository creates a new instance of JobRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewJobRepository(t mockConstructorTestingTNewJobRepository) *JobRepository { +}) *JobRepository { mock := &JobRepository{} mock.Mock.Test(t) diff --git a/internal/infrastructure/repositories/mocks_test/organization_repository_mock.go b/internal/infrastructure/repositories/mocks_test/organization_repository_mock.go index 98b201aa..4438a958 100644 --- a/internal/infrastructure/repositories/mocks_test/organization_repository_mock.go +++ b/internal/infrastructure/repositories/mocks_test/organization_repository_mock.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_test @@ -26,6 +26,10 @@ func (_m *OrganizationRepository) EXPECT() *OrganizationRepository_Expecter { func (_m *OrganizationRepository) Get(ctx context.Context, organizationID string) (*organization.Organization, error) { ret := _m.Called(ctx, organizationID) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *organization.Organization var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*organization.Organization, error)); ok { @@ -81,6 +85,10 @@ func (_c *OrganizationRepository_Get_Call) RunAndReturn(run func(context.Context func (_m *OrganizationRepository) Update(ctx context.Context, organizationID string, request organization.UpdateRequest) (*organization.Organization, error) { ret := _m.Called(ctx, organizationID, request) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *organization.Organization var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, organization.UpdateRequest) (*organization.Organization, error)); ok { @@ -133,13 +141,12 @@ func (_c *OrganizationRepository_Update_Call) RunAndReturn(run func(context.Cont return _c } -type mockConstructorTestingTNewOrganizationRepository interface { +// NewOrganizationRepository creates a new instance of OrganizationRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewOrganizationRepository(t interface { mock.TestingT Cleanup(func()) -} - -// NewOrganizationRepository creates a new instance of OrganizationRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewOrganizationRepository(t mockConstructorTestingTNewOrganizationRepository) *OrganizationRepository { +}) *OrganizationRepository { mock := &OrganizationRepository{} mock.Mock.Test(t) diff --git a/internal/infrastructure/repositories/mocks_test/project_repository_mock.go b/internal/infrastructure/repositories/mocks_test/project_repository_mock.go index afaa0be9..962aadd5 100644 --- a/internal/infrastructure/repositories/mocks_test/project_repository_mock.go +++ b/internal/infrastructure/repositories/mocks_test/project_repository_mock.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_test @@ -26,6 +26,10 @@ func (_m *ProjectRepository) EXPECT() *ProjectRepository_Expecter { func (_m *ProjectRepository) Create(ctx context.Context, organizationID string, request project.UpsertRepositoryRequest) (*project.Project, error) { ret := _m.Called(ctx, organizationID, request) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *project.Project var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, project.UpsertRepositoryRequest) (*project.Project, error)); ok { @@ -82,6 +86,10 @@ func (_c *ProjectRepository_Create_Call) RunAndReturn(run func(context.Context, func (_m *ProjectRepository) Delete(ctx context.Context, projectID string) error { ret := _m.Called(ctx, projectID) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, projectID) @@ -125,6 +133,10 @@ func (_c *ProjectRepository_Delete_Call) RunAndReturn(run func(context.Context, func (_m *ProjectRepository) Get(ctx context.Context, projectID string) (*project.Project, error) { ret := _m.Called(ctx, projectID) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *project.Project var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*project.Project, error)); ok { @@ -180,6 +192,10 @@ func (_c *ProjectRepository_Get_Call) RunAndReturn(run func(context.Context, str func (_m *ProjectRepository) Update(ctx context.Context, projectID string, request project.UpsertRepositoryRequest) (*project.Project, error) { ret := _m.Called(ctx, projectID, request) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *project.Project var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, project.UpsertRepositoryRequest) (*project.Project, error)); ok { @@ -232,13 +248,12 @@ func (_c *ProjectRepository_Update_Call) RunAndReturn(run func(context.Context, return _c } -type mockConstructorTestingTNewProjectRepository interface { +// NewProjectRepository creates a new instance of ProjectRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewProjectRepository(t interface { mock.TestingT Cleanup(func()) -} - -// NewProjectRepository creates a new instance of ProjectRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewProjectRepository(t mockConstructorTestingTNewProjectRepository) *ProjectRepository { +}) *ProjectRepository { mock := &ProjectRepository{} mock.Mock.Test(t) diff --git a/internal/infrastructure/repositories/mocks_test/registry_repository_mock.go b/internal/infrastructure/repositories/mocks_test/registry_repository_mock.go index 10e0f787..b01c25fb 100644 --- a/internal/infrastructure/repositories/mocks_test/registry_repository_mock.go +++ b/internal/infrastructure/repositories/mocks_test/registry_repository_mock.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_test @@ -26,6 +26,10 @@ func (_m *RegistryRepository) EXPECT() *RegistryRepository_Expecter { func (_m *RegistryRepository) Create(ctx context.Context, organizationID string, request registry.UpsertRequest) (*registry.Registry, error) { ret := _m.Called(ctx, organizationID, request) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *registry.Registry var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, registry.UpsertRequest) (*registry.Registry, error)); ok { @@ -82,6 +86,10 @@ func (_c *RegistryRepository_Create_Call) RunAndReturn(run func(context.Context, func (_m *RegistryRepository) Delete(ctx context.Context, organizationID string, registryID string) error { ret := _m.Called(ctx, organizationID, registryID) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = rf(ctx, organizationID, registryID) @@ -126,6 +134,10 @@ func (_c *RegistryRepository_Delete_Call) RunAndReturn(run func(context.Context, func (_m *RegistryRepository) Get(ctx context.Context, organizationID string, registryID string) (*registry.Registry, error) { ret := _m.Called(ctx, organizationID, registryID) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *registry.Registry var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*registry.Registry, error)); ok { @@ -182,6 +194,10 @@ func (_c *RegistryRepository_Get_Call) RunAndReturn(run func(context.Context, st func (_m *RegistryRepository) Update(ctx context.Context, organizationID string, registryID string, request registry.UpsertRequest) (*registry.Registry, error) { ret := _m.Called(ctx, organizationID, registryID, request) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *registry.Registry var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, registry.UpsertRequest) (*registry.Registry, error)); ok { @@ -235,13 +251,12 @@ func (_c *RegistryRepository_Update_Call) RunAndReturn(run func(context.Context, return _c } -type mockConstructorTestingTNewRegistryRepository interface { +// NewRegistryRepository creates a new instance of RegistryRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewRegistryRepository(t interface { mock.TestingT Cleanup(func()) -} - -// NewRegistryRepository creates a new instance of RegistryRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRegistryRepository(t mockConstructorTestingTNewRegistryRepository) *RegistryRepository { +}) *RegistryRepository { mock := &RegistryRepository{} mock.Mock.Test(t) diff --git a/internal/infrastructure/repositories/mocks_test/secret_repository_mock.go b/internal/infrastructure/repositories/mocks_test/secret_repository_mock.go index e0563a49..b233f621 100644 --- a/internal/infrastructure/repositories/mocks_test/secret_repository_mock.go +++ b/internal/infrastructure/repositories/mocks_test/secret_repository_mock.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_test @@ -29,6 +29,10 @@ func (_m *SecretRepository) EXPECT() *SecretRepository_Expecter { func (_m *SecretRepository) Create(ctx context.Context, scopeResourceID string, request secret.UpsertRequest) (*secret.Secret, error) { ret := _m.Called(ctx, scopeResourceID, request) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *secret.Secret var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, secret.UpsertRequest) (*secret.Secret, error)); ok { @@ -85,6 +89,10 @@ func (_c *SecretRepository_Create_Call) RunAndReturn(run func(context.Context, s func (_m *SecretRepository) CreateAlias(ctx context.Context, scopeResourceID string, request secret.UpsertRequest, aliasedSecretId string) (*secret.Secret, error) { ret := _m.Called(ctx, scopeResourceID, request, aliasedSecretId) + if len(ret) == 0 { + panic("no return value specified for CreateAlias") + } + var r0 *secret.Secret var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, secret.UpsertRequest, string) (*secret.Secret, error)); ok { @@ -142,6 +150,10 @@ func (_c *SecretRepository_CreateAlias_Call) RunAndReturn(run func(context.Conte func (_m *SecretRepository) CreateOverride(ctx context.Context, scopeResourceID string, request secret.UpsertRequest, overriddenSecretId string) (*secret.Secret, error) { ret := _m.Called(ctx, scopeResourceID, request, overriddenSecretId) + if len(ret) == 0 { + panic("no return value specified for CreateOverride") + } + var r0 *secret.Secret var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, secret.UpsertRequest, string) (*secret.Secret, error)); ok { @@ -199,6 +211,10 @@ func (_c *SecretRepository_CreateOverride_Call) RunAndReturn(run func(context.Co func (_m *SecretRepository) Delete(ctx context.Context, scopeResourceID string, secretID string) *apierrors.APIError { ret := _m.Called(ctx, scopeResourceID, secretID) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 *apierrors.APIError if rf, ok := ret.Get(0).(func(context.Context, string, string) *apierrors.APIError); ok { r0 = rf(ctx, scopeResourceID, secretID) @@ -245,6 +261,10 @@ func (_c *SecretRepository_Delete_Call) RunAndReturn(run func(context.Context, s func (_m *SecretRepository) List(ctx context.Context, scopeResourceID string) (secret.Secrets, error) { ret := _m.Called(ctx, scopeResourceID) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 secret.Secrets var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (secret.Secrets, error)); ok { @@ -300,6 +320,10 @@ func (_c *SecretRepository_List_Call) RunAndReturn(run func(context.Context, str func (_m *SecretRepository) Update(ctx context.Context, scopeResourceID string, secretID string, request secret.UpsertRequest) (*secret.Secret, error) { ret := _m.Called(ctx, scopeResourceID, secretID, request) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *secret.Secret var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, secret.UpsertRequest) (*secret.Secret, error)); ok { @@ -353,13 +377,12 @@ func (_c *SecretRepository_Update_Call) RunAndReturn(run func(context.Context, s return _c } -type mockConstructorTestingTNewSecretRepository interface { +// NewSecretRepository creates a new instance of SecretRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewSecretRepository(t interface { mock.TestingT Cleanup(func()) -} - -// NewSecretRepository creates a new instance of SecretRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSecretRepository(t mockConstructorTestingTNewSecretRepository) *SecretRepository { +}) *SecretRepository { mock := &SecretRepository{} mock.Mock.Test(t) diff --git a/internal/infrastructure/repositories/mocks_test/variable_repository_mock.go b/internal/infrastructure/repositories/mocks_test/variable_repository_mock.go index a7a0de0b..25ae6a44 100644 --- a/internal/infrastructure/repositories/mocks_test/variable_repository_mock.go +++ b/internal/infrastructure/repositories/mocks_test/variable_repository_mock.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_test @@ -29,6 +29,10 @@ func (_m *VariableRepository) EXPECT() *VariableRepository_Expecter { func (_m *VariableRepository) Create(ctx context.Context, scopeResourceID string, request variable.UpsertRequest) (*variable.Variable, error) { ret := _m.Called(ctx, scopeResourceID, request) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *variable.Variable var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, variable.UpsertRequest) (*variable.Variable, error)); ok { @@ -85,6 +89,10 @@ func (_c *VariableRepository_Create_Call) RunAndReturn(run func(context.Context, func (_m *VariableRepository) CreateAlias(ctx context.Context, scopeResourceID string, request variable.UpsertRequest, aliasedVariableId string) (*variable.Variable, error) { ret := _m.Called(ctx, scopeResourceID, request, aliasedVariableId) + if len(ret) == 0 { + panic("no return value specified for CreateAlias") + } + var r0 *variable.Variable var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, variable.UpsertRequest, string) (*variable.Variable, error)); ok { @@ -142,6 +150,10 @@ func (_c *VariableRepository_CreateAlias_Call) RunAndReturn(run func(context.Con func (_m *VariableRepository) CreateOverride(ctx context.Context, scopeResourceID string, request variable.UpsertRequest, overriddenVariableId string) (*variable.Variable, error) { ret := _m.Called(ctx, scopeResourceID, request, overriddenVariableId) + if len(ret) == 0 { + panic("no return value specified for CreateOverride") + } + var r0 *variable.Variable var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, variable.UpsertRequest, string) (*variable.Variable, error)); ok { @@ -199,6 +211,10 @@ func (_c *VariableRepository_CreateOverride_Call) RunAndReturn(run func(context. func (_m *VariableRepository) Delete(ctx context.Context, scopeResourceID string, variableID string) *apierrors.APIError { ret := _m.Called(ctx, scopeResourceID, variableID) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 *apierrors.APIError if rf, ok := ret.Get(0).(func(context.Context, string, string) *apierrors.APIError); ok { r0 = rf(ctx, scopeResourceID, variableID) @@ -245,6 +261,10 @@ func (_c *VariableRepository_Delete_Call) RunAndReturn(run func(context.Context, func (_m *VariableRepository) List(ctx context.Context, scopeResourceID string) (variable.Variables, error) { ret := _m.Called(ctx, scopeResourceID) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 variable.Variables var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (variable.Variables, error)); ok { @@ -300,6 +320,10 @@ func (_c *VariableRepository_List_Call) RunAndReturn(run func(context.Context, s func (_m *VariableRepository) Update(ctx context.Context, scopeResourceID string, variableID string, request variable.UpsertRequest) (*variable.Variable, error) { ret := _m.Called(ctx, scopeResourceID, variableID, request) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *variable.Variable var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, variable.UpsertRequest) (*variable.Variable, error)); ok { @@ -353,13 +377,12 @@ func (_c *VariableRepository_Update_Call) RunAndReturn(run func(context.Context, return _c } -type mockConstructorTestingTNewVariableRepository interface { +// NewVariableRepository creates a new instance of VariableRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewVariableRepository(t interface { mock.TestingT Cleanup(func()) -} - -// NewVariableRepository creates a new instance of VariableRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVariableRepository(t mockConstructorTestingTNewVariableRepository) *VariableRepository { +}) *VariableRepository { mock := &VariableRepository{} mock.Mock.Test(t)