This commit is contained in:
Casey Lee 2020-02-25 16:58:26 -08:00
parent 76ecede42e
commit 8696b42178
No known key found for this signature in database
GPG Key ID: 1899120ECD0A1784
3 changed files with 9 additions and 8 deletions

1
CODEOWNERS Normal file
View File

@ -0,0 +1 @@
* @cplee

View File

@ -9,9 +9,9 @@ import (
func TestCartisianProduct(t *testing.T) {
assert := assert.New(t)
input := map[string][]interface{}{
"foo": []interface{}{1, 2, 3, 4},
"bar": []interface{}{"a", "b", "c"},
"baz": []interface{}{false, true},
"foo": {1, 2, 3, 4},
"bar": {"a", "b", "c"},
"baz": {false, true},
}
output := CartesianProduct(input)

View File

@ -18,11 +18,11 @@ func TestEvaluate(t *testing.T) {
Workflow: &model.Workflow{
Name: "test-workflow",
Jobs: map[string]*model.Job{
"job1": &model.Job{
"job1": {
Strategy: &model.Strategy{
Matrix: map[string][]interface{}{
"os": []interface{}{"Linux", "Windows"},
"foo": []interface{}{"bar", "baz"},
"os": {"Linux", "Windows"},
"foo": {"bar", "baz"},
},
},
},
@ -34,7 +34,7 @@ func TestEvaluate(t *testing.T) {
"foo": "bar",
},
StepResults: map[string]*stepResult{
"id1": &stepResult{
"id1": {
Outputs: map[string]string{
"foo": "bar",
},
@ -106,7 +106,7 @@ func TestInterpolate(t *testing.T) {
Workflow: &model.Workflow{
Name: "test-workflow",
Jobs: map[string]*model.Job{
"job1": &model.Job{},
"job1": {},
},
},
},