Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <[email protected]>
  • Loading branch information
pingsutw committed May 9, 2023
1 parent ed392b5 commit 4b738f8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pkg/manager/impl/execution_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1143,8 +1143,12 @@ func TestCreateExecutionWithEnvs(t *testing.T) {
assert.NotEqual(t, uint(0), input.LaunchPlanID)
assert.Equal(t, uint(0), input.TaskID)
}

assert.Equal(t, tt.envs, spec.GetEnvs().Values)
if len(tt.envs) != 0 {
assert.Equal(t, tt.envs[0].Key, spec.GetEnvs().Values[0].Key)
assert.Equal(t, tt.envs[0].Value, spec.GetEnvs().Values[0].Value)
} else {
assert.Nil(t, spec.GetEnvs().GetValues())
}

return nil
}
Expand Down Expand Up @@ -1665,7 +1669,8 @@ func TestRelaunchExecutionEnvsOverride(t *testing.T) {
assert.Equal(t, admin.ExecutionMetadata_RELAUNCH, spec.Metadata.Mode)
assert.Equal(t, int32(admin.ExecutionMetadata_RELAUNCH), input.Mode)
assert.NotNil(t, spec.GetEnvs())
assert.Equal(t, spec.GetEnvs().Values, env)
assert.Equal(t, spec.GetEnvs().Values[0].Key, env[0].Key)
assert.Equal(t, spec.GetEnvs().Values[0].Value, env[0].Value)
return nil
}
repository.ExecutionRepo().(*repositoryMocks.MockExecutionRepo).SetCreateCallback(exCreateFunc)
Expand Down

0 comments on commit 4b738f8

Please sign in to comment.