Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(provisioner): handle multiple agents, apps, scripts and envs#13741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mtojek merged 11 commits intomainfrom12949-apps
Jul 3, 2024
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Fix: script tests
  • Loading branch information
@mtojek
mtojek committedJul 3, 2024
commitf5484ecc2ef9096d9b31a01024254f8d9a8485f9
21 changes: 18 additions & 3 deletionsprovisioner/terraform/resources_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -677,9 +677,6 @@ func TestConvertResources(t *testing.T) {
}},
},
} {
if folderName != "multiple-agents-multiple-scripts" {
continue
}
folderName := folderName
expected := expected
t.Run(folderName, func(t *testing.T) {
Expand DownExpand Up@@ -709,6 +706,18 @@ func TestConvertResources(t *testing.T) {
sortResources(state.Resources)
sortExternalAuthProviders(state.ExternalAuthProviders)

for _, resource := range state.Resources {
for _, agent := range resource.Agents {
agent.Id = ""
if agent.GetToken() != "" {
agent.Auth = &proto.Agent_Token{}
}
if agent.GetInstanceId() != "" {
agent.Auth = &proto.Agent_InstanceId{}
}
}
}

expectedNoMetadata := make([]*proto.Resource, 0)
for _, resource := range expected.resources {
resourceCopy, _ := protobuf.Clone(resource).(*proto.Resource)
Expand DownExpand Up@@ -771,6 +780,12 @@ func TestConvertResources(t *testing.T) {
if agent.GetInstanceId() != "" {
agent.Auth = &proto.Agent_InstanceId{}
}

for _, script := range agent.Scripts {
// FIXME `RunOnStart`` is set only in "Provision", so we need to clear it
// to simplify table tests. Current tests do not verify `RunOnStart` properties.
script.RunOnStart = false
}
}
}
// Convert expectedNoMetadata and resources into a
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp