add a fix

This commit is contained in:
Lynn Cyrin 2019-12-24 08:55:31 -08:00
parent 1651eec7b8
commit 9eb7426ac3
No known key found for this signature in database
GPG Key ID: 9E60BEE0555C367B

View File

@ -370,11 +370,35 @@ func TestContextAttributeAccessing(t *testing.T) {
newContextInput: nil,
},
{
testCase: "empty_set_bool_and_present_ctx_bool_with_background_context",
testCase: "present_set_bool_and_present_ctx_bool_with_background_context",
setBoolInput: "",
ctxBoolInput: "ctx-bool",
newContextInput: &Context{Context: context.Background()},
},
{
testCase: "present_set_bool_and_present_ctx_bool",
setBoolInput: "ctx-bool",
ctxBoolInput: "ctx-bool",
newContextInput: nil,
},
{
testCase: "present_set_bool_and_present_ctx_bool_with_background_context",
setBoolInput: "ctx-bool",
ctxBoolInput: "ctx-bool",
newContextInput: &Context{Context: context.Background()},
},
{
testCase: "present_set_bool_and_different_ctx_bool",
setBoolInput: "ctx-bool",
ctxBoolInput: "not-ctx-bool",
newContextInput: nil,
},
{
testCase: "present_set_bool_and_different_ctx_bool_with_background_context",
setBoolInput: "ctx-bool",
ctxBoolInput: "not-ctx-bool",
newContextInput: &Context{Context: context.Background()},
},
}
for _, test := range tdata {