Skip to content

Commit

Permalink
Provider configurations: Owners and Share with all environments setti…
Browse files Browse the repository at this point in the history
…ng cannot be enabled simultaneously
  • Loading branch information
DayS1eeper committed May 17, 2024
1 parent e1741e6 commit 5857227
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions provider_configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,9 @@ func TestProviderConfigurationUpdateScalr(t *testing.T) {
environment, deleteEnvironment := createEnvironment(t, client)
defer deleteEnvironment()

ownerTeam, ownerTeamCleanup := createTeam(t, client, nil)
defer ownerTeamCleanup()

t.Run("success scalr", func(t *testing.T) {
createOptions := ProviderConfigurationCreateOptions{
Account: &Account{ID: defaultAccountID},
Expand All @@ -571,24 +574,22 @@ func TestProviderConfigurationUpdateScalr(t *testing.T) {
ScalrToken: String(scalrToken),
IsShared: Bool(false),
Environments: []*Environment{environment},
Owners: []*Team{{ID: ownerTeam.ID}},
}
configuration, err := client.ProviderConfigurations.Create(ctx, createOptions)
if err != nil {
t.Fatal(err)
}
defer client.ProviderConfigurations.Delete(ctx, configuration.ID)

ownerTeam, ownerTeamCleanup := createTeam(t, client, nil)
defer ownerTeamCleanup()

updateOptions := ProviderConfigurationUpdateOptions{
Name: String("scalr_prod"),
ExportShellVariables: Bool(true),
ScalrHostname: String(scalrHostname + "/"),
ScalrToken: String(scalrToken),
IsShared: Bool(true),
Environments: []*Environment{},
Owners: []*Team{{ID: ownerTeam.ID}},
Owners: []*Team{},
}
updatedConfiguration, err := client.ProviderConfigurations.Update(
ctx, configuration.ID, updateOptions,
Expand Down

0 comments on commit 5857227

Please sign in to comment.