mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-06 08:15:48 -04:00
AB#2579 Add constellation iam create command (#624)
This commit is contained in:
parent
be01cf7129
commit
286803fb97
38 changed files with 2029 additions and 108 deletions
|
@ -10,7 +10,9 @@ import (
|
|||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/edgelesssys/constellation/v2/cli/internal/cloudcmd"
|
||||
"github.com/edgelesssys/constellation/v2/cli/internal/clusterid"
|
||||
"github.com/edgelesssys/constellation/v2/cli/internal/iamid"
|
||||
"github.com/edgelesssys/constellation/v2/internal/cloud/cloudprovider"
|
||||
"github.com/edgelesssys/constellation/v2/internal/config"
|
||||
"go.uber.org/goleak"
|
||||
|
@ -54,3 +56,19 @@ func (c *stubCloudTerminator) Terminate(context.Context) error {
|
|||
func (c *stubCloudTerminator) Called() bool {
|
||||
return c.called
|
||||
}
|
||||
|
||||
type stubIAMCreator struct {
|
||||
createCalled bool
|
||||
id iamid.File
|
||||
createErr error
|
||||
}
|
||||
|
||||
func (c *stubIAMCreator) Create(
|
||||
ctx context.Context,
|
||||
provider cloudprovider.Provider,
|
||||
iamConfig *cloudcmd.IAMConfig,
|
||||
) (iamid.File, error) {
|
||||
c.createCalled = true
|
||||
c.id.CloudProvider = provider
|
||||
return c.id, c.createErr
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue