github.com/argoproj/argo-cd/v2@v2.10.5/util/db/mocks/ArgoDB.go (about) 1 // Code generated by mockery v2.32.4. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 context "context" 7 8 db "github.com/argoproj/argo-cd/v2/util/db" 9 mock "github.com/stretchr/testify/mock" 10 11 v1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1" 12 ) 13 14 // ArgoDB is an autogenerated mock type for the ArgoDB type 15 type ArgoDB struct { 16 mock.Mock 17 } 18 19 // AddGPGPublicKey provides a mock function with given fields: ctx, keyData 20 func (_m *ArgoDB) AddGPGPublicKey(ctx context.Context, keyData string) (map[string]*v1alpha1.GnuPGPublicKey, []string, error) { 21 ret := _m.Called(ctx, keyData) 22 23 var r0 map[string]*v1alpha1.GnuPGPublicKey 24 var r1 []string 25 var r2 error 26 if rf, ok := ret.Get(0).(func(context.Context, string) (map[string]*v1alpha1.GnuPGPublicKey, []string, error)); ok { 27 return rf(ctx, keyData) 28 } 29 if rf, ok := ret.Get(0).(func(context.Context, string) map[string]*v1alpha1.GnuPGPublicKey); ok { 30 r0 = rf(ctx, keyData) 31 } else { 32 if ret.Get(0) != nil { 33 r0 = ret.Get(0).(map[string]*v1alpha1.GnuPGPublicKey) 34 } 35 } 36 37 if rf, ok := ret.Get(1).(func(context.Context, string) []string); ok { 38 r1 = rf(ctx, keyData) 39 } else { 40 if ret.Get(1) != nil { 41 r1 = ret.Get(1).([]string) 42 } 43 } 44 45 if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { 46 r2 = rf(ctx, keyData) 47 } else { 48 r2 = ret.Error(2) 49 } 50 51 return r0, r1, r2 52 } 53 54 // CreateCluster provides a mock function with given fields: ctx, c 55 func (_m *ArgoDB) CreateCluster(ctx context.Context, c *v1alpha1.Cluster) (*v1alpha1.Cluster, error) { 56 ret := _m.Called(ctx, c) 57 58 var r0 *v1alpha1.Cluster 59 var r1 error 60 if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Cluster) (*v1alpha1.Cluster, error)); ok { 61 return rf(ctx, c) 62 } 63 if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Cluster) *v1alpha1.Cluster); ok { 64 r0 = rf(ctx, c) 65 } else { 66 if ret.Get(0) != nil { 67 r0 = ret.Get(0).(*v1alpha1.Cluster) 68 } 69 } 70 71 if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.Cluster) error); ok { 72 r1 = rf(ctx, c) 73 } else { 74 r1 = ret.Error(1) 75 } 76 77 return r0, r1 78 } 79 80 // CreateRepoCertificate provides a mock function with given fields: ctx, certificate, upsert 81 func (_m *ArgoDB) CreateRepoCertificate(ctx context.Context, certificate *v1alpha1.RepositoryCertificateList, upsert bool) (*v1alpha1.RepositoryCertificateList, error) { 82 ret := _m.Called(ctx, certificate, upsert) 83 84 var r0 *v1alpha1.RepositoryCertificateList 85 var r1 error 86 if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepositoryCertificateList, bool) (*v1alpha1.RepositoryCertificateList, error)); ok { 87 return rf(ctx, certificate, upsert) 88 } 89 if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepositoryCertificateList, bool) *v1alpha1.RepositoryCertificateList); ok { 90 r0 = rf(ctx, certificate, upsert) 91 } else { 92 if ret.Get(0) != nil { 93 r0 = ret.Get(0).(*v1alpha1.RepositoryCertificateList) 94 } 95 } 96 97 if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.RepositoryCertificateList, bool) error); ok { 98 r1 = rf(ctx, certificate, upsert) 99 } else { 100 r1 = ret.Error(1) 101 } 102 103 return r0, r1 104 } 105 106 // CreateRepository provides a mock function with given fields: ctx, r 107 func (_m *ArgoDB) CreateRepository(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error) { 108 ret := _m.Called(ctx, r) 109 110 var r0 *v1alpha1.Repository 111 var r1 error 112 if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)); ok { 113 return rf(ctx, r) 114 } 115 if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) *v1alpha1.Repository); ok { 116 r0 = rf(ctx, r) 117 } else { 118 if ret.Get(0) != nil { 119 r0 = ret.Get(0).(*v1alpha1.Repository) 120 } 121 } 122 123 if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.Repository) error); ok { 124 r1 = rf(ctx, r) 125 } else { 126 r1 = ret.Error(1) 127 } 128 129 return r0, r1 130 } 131 132 // CreateRepositoryCredentials provides a mock function with given fields: ctx, r 133 func (_m *ArgoDB) CreateRepositoryCredentials(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error) { 134 ret := _m.Called(ctx, r) 135 136 var r0 *v1alpha1.RepoCreds 137 var r1 error 138 if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)); ok { 139 return rf(ctx, r) 140 } 141 if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) *v1alpha1.RepoCreds); ok { 142 r0 = rf(ctx, r) 143 } else { 144 if ret.Get(0) != nil { 145 r0 = ret.Get(0).(*v1alpha1.RepoCreds) 146 } 147 } 148 149 if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.RepoCreds) error); ok { 150 r1 = rf(ctx, r) 151 } else { 152 r1 = ret.Error(1) 153 } 154 155 return r0, r1 156 } 157 158 // DeleteCluster provides a mock function with given fields: ctx, server 159 func (_m *ArgoDB) DeleteCluster(ctx context.Context, server string) error { 160 ret := _m.Called(ctx, server) 161 162 var r0 error 163 if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { 164 r0 = rf(ctx, server) 165 } else { 166 r0 = ret.Error(0) 167 } 168 169 return r0 170 } 171 172 // DeleteGPGPublicKey provides a mock function with given fields: ctx, keyID 173 func (_m *ArgoDB) DeleteGPGPublicKey(ctx context.Context, keyID string) error { 174 ret := _m.Called(ctx, keyID) 175 176 var r0 error 177 if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { 178 r0 = rf(ctx, keyID) 179 } else { 180 r0 = ret.Error(0) 181 } 182 183 return r0 184 } 185 186 // DeleteRepository provides a mock function with given fields: ctx, name 187 func (_m *ArgoDB) DeleteRepository(ctx context.Context, name string) error { 188 ret := _m.Called(ctx, name) 189 190 var r0 error 191 if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { 192 r0 = rf(ctx, name) 193 } else { 194 r0 = ret.Error(0) 195 } 196 197 return r0 198 } 199 200 // DeleteRepositoryCredentials provides a mock function with given fields: ctx, name 201 func (_m *ArgoDB) DeleteRepositoryCredentials(ctx context.Context, name string) error { 202 ret := _m.Called(ctx, name) 203 204 var r0 error 205 if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { 206 r0 = rf(ctx, name) 207 } else { 208 r0 = ret.Error(0) 209 } 210 211 return r0 212 } 213 214 // GetAllHelmRepositoryCredentials provides a mock function with given fields: ctx 215 func (_m *ArgoDB) GetAllHelmRepositoryCredentials(ctx context.Context) ([]*v1alpha1.RepoCreds, error) { 216 ret := _m.Called(ctx) 217 218 var r0 []*v1alpha1.RepoCreds 219 var r1 error 220 if rf, ok := ret.Get(0).(func(context.Context) ([]*v1alpha1.RepoCreds, error)); ok { 221 return rf(ctx) 222 } 223 if rf, ok := ret.Get(0).(func(context.Context) []*v1alpha1.RepoCreds); ok { 224 r0 = rf(ctx) 225 } else { 226 if ret.Get(0) != nil { 227 r0 = ret.Get(0).([]*v1alpha1.RepoCreds) 228 } 229 } 230 231 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 232 r1 = rf(ctx) 233 } else { 234 r1 = ret.Error(1) 235 } 236 237 return r0, r1 238 } 239 240 // GetApplicationControllerReplicas provides a mock function with given fields: 241 func (_m *ArgoDB) GetApplicationControllerReplicas() int { 242 ret := _m.Called() 243 244 var r0 int 245 if rf, ok := ret.Get(0).(func() int); ok { 246 r0 = rf() 247 } else { 248 r0 = ret.Get(0).(int) 249 } 250 251 return r0 252 } 253 254 // GetCluster provides a mock function with given fields: ctx, server 255 func (_m *ArgoDB) GetCluster(ctx context.Context, server string) (*v1alpha1.Cluster, error) { 256 ret := _m.Called(ctx, server) 257 258 var r0 *v1alpha1.Cluster 259 var r1 error 260 if rf, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.Cluster, error)); ok { 261 return rf(ctx, server) 262 } 263 if rf, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.Cluster); ok { 264 r0 = rf(ctx, server) 265 } else { 266 if ret.Get(0) != nil { 267 r0 = ret.Get(0).(*v1alpha1.Cluster) 268 } 269 } 270 271 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 272 r1 = rf(ctx, server) 273 } else { 274 r1 = ret.Error(1) 275 } 276 277 return r0, r1 278 } 279 280 // GetClusterServersByName provides a mock function with given fields: ctx, name 281 func (_m *ArgoDB) GetClusterServersByName(ctx context.Context, name string) ([]string, error) { 282 ret := _m.Called(ctx, name) 283 284 var r0 []string 285 var r1 error 286 if rf, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok { 287 return rf(ctx, name) 288 } 289 if rf, ok := ret.Get(0).(func(context.Context, string) []string); ok { 290 r0 = rf(ctx, name) 291 } else { 292 if ret.Get(0) != nil { 293 r0 = ret.Get(0).([]string) 294 } 295 } 296 297 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 298 r1 = rf(ctx, name) 299 } else { 300 r1 = ret.Error(1) 301 } 302 303 return r0, r1 304 } 305 306 // GetProjectClusters provides a mock function with given fields: ctx, project 307 func (_m *ArgoDB) GetProjectClusters(ctx context.Context, project string) ([]*v1alpha1.Cluster, error) { 308 ret := _m.Called(ctx, project) 309 310 var r0 []*v1alpha1.Cluster 311 var r1 error 312 if rf, ok := ret.Get(0).(func(context.Context, string) ([]*v1alpha1.Cluster, error)); ok { 313 return rf(ctx, project) 314 } 315 if rf, ok := ret.Get(0).(func(context.Context, string) []*v1alpha1.Cluster); ok { 316 r0 = rf(ctx, project) 317 } else { 318 if ret.Get(0) != nil { 319 r0 = ret.Get(0).([]*v1alpha1.Cluster) 320 } 321 } 322 323 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 324 r1 = rf(ctx, project) 325 } else { 326 r1 = ret.Error(1) 327 } 328 329 return r0, r1 330 } 331 332 // GetProjectRepositories provides a mock function with given fields: ctx, project 333 func (_m *ArgoDB) GetProjectRepositories(ctx context.Context, project string) ([]*v1alpha1.Repository, error) { 334 ret := _m.Called(ctx, project) 335 336 var r0 []*v1alpha1.Repository 337 var r1 error 338 if rf, ok := ret.Get(0).(func(context.Context, string) ([]*v1alpha1.Repository, error)); ok { 339 return rf(ctx, project) 340 } 341 if rf, ok := ret.Get(0).(func(context.Context, string) []*v1alpha1.Repository); ok { 342 r0 = rf(ctx, project) 343 } else { 344 if ret.Get(0) != nil { 345 r0 = ret.Get(0).([]*v1alpha1.Repository) 346 } 347 } 348 349 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 350 r1 = rf(ctx, project) 351 } else { 352 r1 = ret.Error(1) 353 } 354 355 return r0, r1 356 } 357 358 // GetRepository provides a mock function with given fields: ctx, url 359 func (_m *ArgoDB) GetRepository(ctx context.Context, url string) (*v1alpha1.Repository, error) { 360 ret := _m.Called(ctx, url) 361 362 var r0 *v1alpha1.Repository 363 var r1 error 364 if rf, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.Repository, error)); ok { 365 return rf(ctx, url) 366 } 367 if rf, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.Repository); ok { 368 r0 = rf(ctx, url) 369 } else { 370 if ret.Get(0) != nil { 371 r0 = ret.Get(0).(*v1alpha1.Repository) 372 } 373 } 374 375 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 376 r1 = rf(ctx, url) 377 } else { 378 r1 = ret.Error(1) 379 } 380 381 return r0, r1 382 } 383 384 // GetRepositoryCredentials provides a mock function with given fields: ctx, name 385 func (_m *ArgoDB) GetRepositoryCredentials(ctx context.Context, name string) (*v1alpha1.RepoCreds, error) { 386 ret := _m.Called(ctx, name) 387 388 var r0 *v1alpha1.RepoCreds 389 var r1 error 390 if rf, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.RepoCreds, error)); ok { 391 return rf(ctx, name) 392 } 393 if rf, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.RepoCreds); ok { 394 r0 = rf(ctx, name) 395 } else { 396 if ret.Get(0) != nil { 397 r0 = ret.Get(0).(*v1alpha1.RepoCreds) 398 } 399 } 400 401 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 402 r1 = rf(ctx, name) 403 } else { 404 r1 = ret.Error(1) 405 } 406 407 return r0, r1 408 } 409 410 // ListClusters provides a mock function with given fields: ctx 411 func (_m *ArgoDB) ListClusters(ctx context.Context) (*v1alpha1.ClusterList, error) { 412 ret := _m.Called(ctx) 413 414 var r0 *v1alpha1.ClusterList 415 var r1 error 416 if rf, ok := ret.Get(0).(func(context.Context) (*v1alpha1.ClusterList, error)); ok { 417 return rf(ctx) 418 } 419 if rf, ok := ret.Get(0).(func(context.Context) *v1alpha1.ClusterList); ok { 420 r0 = rf(ctx) 421 } else { 422 if ret.Get(0) != nil { 423 r0 = ret.Get(0).(*v1alpha1.ClusterList) 424 } 425 } 426 427 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 428 r1 = rf(ctx) 429 } else { 430 r1 = ret.Error(1) 431 } 432 433 return r0, r1 434 } 435 436 // ListConfiguredGPGPublicKeys provides a mock function with given fields: ctx 437 func (_m *ArgoDB) ListConfiguredGPGPublicKeys(ctx context.Context) (map[string]*v1alpha1.GnuPGPublicKey, error) { 438 ret := _m.Called(ctx) 439 440 var r0 map[string]*v1alpha1.GnuPGPublicKey 441 var r1 error 442 if rf, ok := ret.Get(0).(func(context.Context) (map[string]*v1alpha1.GnuPGPublicKey, error)); ok { 443 return rf(ctx) 444 } 445 if rf, ok := ret.Get(0).(func(context.Context) map[string]*v1alpha1.GnuPGPublicKey); ok { 446 r0 = rf(ctx) 447 } else { 448 if ret.Get(0) != nil { 449 r0 = ret.Get(0).(map[string]*v1alpha1.GnuPGPublicKey) 450 } 451 } 452 453 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 454 r1 = rf(ctx) 455 } else { 456 r1 = ret.Error(1) 457 } 458 459 return r0, r1 460 } 461 462 // ListHelmRepositories provides a mock function with given fields: ctx 463 func (_m *ArgoDB) ListHelmRepositories(ctx context.Context) ([]*v1alpha1.Repository, error) { 464 ret := _m.Called(ctx) 465 466 var r0 []*v1alpha1.Repository 467 var r1 error 468 if rf, ok := ret.Get(0).(func(context.Context) ([]*v1alpha1.Repository, error)); ok { 469 return rf(ctx) 470 } 471 if rf, ok := ret.Get(0).(func(context.Context) []*v1alpha1.Repository); ok { 472 r0 = rf(ctx) 473 } else { 474 if ret.Get(0) != nil { 475 r0 = ret.Get(0).([]*v1alpha1.Repository) 476 } 477 } 478 479 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 480 r1 = rf(ctx) 481 } else { 482 r1 = ret.Error(1) 483 } 484 485 return r0, r1 486 } 487 488 // ListRepoCertificates provides a mock function with given fields: ctx, selector 489 func (_m *ArgoDB) ListRepoCertificates(ctx context.Context, selector *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error) { 490 ret := _m.Called(ctx, selector) 491 492 var r0 *v1alpha1.RepositoryCertificateList 493 var r1 error 494 if rf, ok := ret.Get(0).(func(context.Context, *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error)); ok { 495 return rf(ctx, selector) 496 } 497 if rf, ok := ret.Get(0).(func(context.Context, *db.CertificateListSelector) *v1alpha1.RepositoryCertificateList); ok { 498 r0 = rf(ctx, selector) 499 } else { 500 if ret.Get(0) != nil { 501 r0 = ret.Get(0).(*v1alpha1.RepositoryCertificateList) 502 } 503 } 504 505 if rf, ok := ret.Get(1).(func(context.Context, *db.CertificateListSelector) error); ok { 506 r1 = rf(ctx, selector) 507 } else { 508 r1 = ret.Error(1) 509 } 510 511 return r0, r1 512 } 513 514 // ListRepositories provides a mock function with given fields: ctx 515 func (_m *ArgoDB) ListRepositories(ctx context.Context) ([]*v1alpha1.Repository, error) { 516 ret := _m.Called(ctx) 517 518 var r0 []*v1alpha1.Repository 519 var r1 error 520 if rf, ok := ret.Get(0).(func(context.Context) ([]*v1alpha1.Repository, error)); ok { 521 return rf(ctx) 522 } 523 if rf, ok := ret.Get(0).(func(context.Context) []*v1alpha1.Repository); ok { 524 r0 = rf(ctx) 525 } else { 526 if ret.Get(0) != nil { 527 r0 = ret.Get(0).([]*v1alpha1.Repository) 528 } 529 } 530 531 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 532 r1 = rf(ctx) 533 } else { 534 r1 = ret.Error(1) 535 } 536 537 return r0, r1 538 } 539 540 // ListRepositoryCredentials provides a mock function with given fields: ctx 541 func (_m *ArgoDB) ListRepositoryCredentials(ctx context.Context) ([]string, error) { 542 ret := _m.Called(ctx) 543 544 var r0 []string 545 var r1 error 546 if rf, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok { 547 return rf(ctx) 548 } 549 if rf, ok := ret.Get(0).(func(context.Context) []string); ok { 550 r0 = rf(ctx) 551 } else { 552 if ret.Get(0) != nil { 553 r0 = ret.Get(0).([]string) 554 } 555 } 556 557 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 558 r1 = rf(ctx) 559 } else { 560 r1 = ret.Error(1) 561 } 562 563 return r0, r1 564 } 565 566 // RemoveRepoCertificates provides a mock function with given fields: ctx, selector 567 func (_m *ArgoDB) RemoveRepoCertificates(ctx context.Context, selector *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error) { 568 ret := _m.Called(ctx, selector) 569 570 var r0 *v1alpha1.RepositoryCertificateList 571 var r1 error 572 if rf, ok := ret.Get(0).(func(context.Context, *db.CertificateListSelector) (*v1alpha1.RepositoryCertificateList, error)); ok { 573 return rf(ctx, selector) 574 } 575 if rf, ok := ret.Get(0).(func(context.Context, *db.CertificateListSelector) *v1alpha1.RepositoryCertificateList); ok { 576 r0 = rf(ctx, selector) 577 } else { 578 if ret.Get(0) != nil { 579 r0 = ret.Get(0).(*v1alpha1.RepositoryCertificateList) 580 } 581 } 582 583 if rf, ok := ret.Get(1).(func(context.Context, *db.CertificateListSelector) error); ok { 584 r1 = rf(ctx, selector) 585 } else { 586 r1 = ret.Error(1) 587 } 588 589 return r0, r1 590 } 591 592 // RepositoryExists provides a mock function with given fields: ctx, repoURL 593 func (_m *ArgoDB) RepositoryExists(ctx context.Context, repoURL string) (bool, error) { 594 ret := _m.Called(ctx, repoURL) 595 596 var r0 bool 597 var r1 error 598 if rf, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok { 599 return rf(ctx, repoURL) 600 } 601 if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok { 602 r0 = rf(ctx, repoURL) 603 } else { 604 r0 = ret.Get(0).(bool) 605 } 606 607 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 608 r1 = rf(ctx, repoURL) 609 } else { 610 r1 = ret.Error(1) 611 } 612 613 return r0, r1 614 } 615 616 // UpdateCluster provides a mock function with given fields: ctx, c 617 func (_m *ArgoDB) UpdateCluster(ctx context.Context, c *v1alpha1.Cluster) (*v1alpha1.Cluster, error) { 618 ret := _m.Called(ctx, c) 619 620 var r0 *v1alpha1.Cluster 621 var r1 error 622 if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Cluster) (*v1alpha1.Cluster, error)); ok { 623 return rf(ctx, c) 624 } 625 if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Cluster) *v1alpha1.Cluster); ok { 626 r0 = rf(ctx, c) 627 } else { 628 if ret.Get(0) != nil { 629 r0 = ret.Get(0).(*v1alpha1.Cluster) 630 } 631 } 632 633 if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.Cluster) error); ok { 634 r1 = rf(ctx, c) 635 } else { 636 r1 = ret.Error(1) 637 } 638 639 return r0, r1 640 } 641 642 // UpdateRepository provides a mock function with given fields: ctx, r 643 func (_m *ArgoDB) UpdateRepository(ctx context.Context, r *v1alpha1.Repository) (*v1alpha1.Repository, error) { 644 ret := _m.Called(ctx, r) 645 646 var r0 *v1alpha1.Repository 647 var r1 error 648 if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) (*v1alpha1.Repository, error)); ok { 649 return rf(ctx, r) 650 } 651 if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Repository) *v1alpha1.Repository); ok { 652 r0 = rf(ctx, r) 653 } else { 654 if ret.Get(0) != nil { 655 r0 = ret.Get(0).(*v1alpha1.Repository) 656 } 657 } 658 659 if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.Repository) error); ok { 660 r1 = rf(ctx, r) 661 } else { 662 r1 = ret.Error(1) 663 } 664 665 return r0, r1 666 } 667 668 // UpdateRepositoryCredentials provides a mock function with given fields: ctx, r 669 func (_m *ArgoDB) UpdateRepositoryCredentials(ctx context.Context, r *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error) { 670 ret := _m.Called(ctx, r) 671 672 var r0 *v1alpha1.RepoCreds 673 var r1 error 674 if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) (*v1alpha1.RepoCreds, error)); ok { 675 return rf(ctx, r) 676 } 677 if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.RepoCreds) *v1alpha1.RepoCreds); ok { 678 r0 = rf(ctx, r) 679 } else { 680 if ret.Get(0) != nil { 681 r0 = ret.Get(0).(*v1alpha1.RepoCreds) 682 } 683 } 684 685 if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.RepoCreds) error); ok { 686 r1 = rf(ctx, r) 687 } else { 688 r1 = ret.Error(1) 689 } 690 691 return r0, r1 692 } 693 694 // WatchClusters provides a mock function with given fields: ctx, handleAddEvent, handleModEvent, handleDeleteEvent 695 func (_m *ArgoDB) WatchClusters(ctx context.Context, handleAddEvent func(*v1alpha1.Cluster), handleModEvent func(*v1alpha1.Cluster, *v1alpha1.Cluster), handleDeleteEvent func(string)) error { 696 ret := _m.Called(ctx, handleAddEvent, handleModEvent, handleDeleteEvent) 697 698 var r0 error 699 if rf, ok := ret.Get(0).(func(context.Context, func(*v1alpha1.Cluster), func(*v1alpha1.Cluster, *v1alpha1.Cluster), func(string)) error); ok { 700 r0 = rf(ctx, handleAddEvent, handleModEvent, handleDeleteEvent) 701 } else { 702 r0 = ret.Error(0) 703 } 704 705 return r0 706 } 707 708 // NewArgoDB creates a new instance of ArgoDB. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 709 // The first argument is typically a *testing.T value. 710 func NewArgoDB(t interface { 711 mock.TestingT 712 Cleanup(func()) 713 }) *ArgoDB { 714 mock := &ArgoDB{} 715 mock.Mock.Test(t) 716 717 t.Cleanup(func() { mock.AssertExpectations(t) }) 718 719 return mock 720 }