Skip to content

Commit

Permalink
Issue #177: test merge for disabled processes
Browse files Browse the repository at this point in the history
  • Loading branch information
F1bonacc1 committed May 6, 2024
1 parent f8c25b9 commit 6aa0b8e
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
7 changes: 7 additions & 0 deletions issues/issue_177/process-compose.override.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
processes:
test:
disabled: false
command: echo bar
pc_log:
command: "tail -f -n100 process-compose-${USER}.log"
working_dir: "/tmp"
5 changes: 5 additions & 0 deletions issues/issue_177/process-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: "0.5"
processes:
test:
disabled: true
command: echo foo
26 changes: 25 additions & 1 deletion src/loader/merger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,30 @@ func Test_mergeProcesses(t *testing.T) {
},
wantErr: false,
},
{
name: "Disabled Process",
args: args{
base: types.Processes{
"test": types.ProcessConfig{
Disabled: true,
Command: "echo foo",
},
},
override: types.Processes{
"test": types.ProcessConfig{
Disabled: false,
Command: "echo bar",
},
},
},
want: types.Processes{
"test": types.ProcessConfig{
Disabled: true,
Command: "echo bar",
},
},
wantErr: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand All @@ -411,7 +435,7 @@ func Test_mergeProcesses(t *testing.T) {
return
}
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("mergeProcesses() got = %v, want %v", got, tt.want)
t.Errorf("mergeProcesses() got = %+v, want %+v", got, tt.want)
}
})
}
Expand Down

0 comments on commit 6aa0b8e

Please sign in to comment.