diff --git a/plancheck/expect_known_output_value_at_path_test.go b/plancheck/expect_known_output_value_at_path_test.go index 2cb8cc07a..fcd83b14d 100644 --- a/plancheck/expect_known_output_value_at_path_test.go +++ b/plancheck/expect_known_output_value_at_path_test.go @@ -217,7 +217,7 @@ func TestExpectKnownOutputValueAtPath_CheckPlan_Bool_KnownValueWrongValue(t *tes ), }, }, - ExpectError: regexp.MustCompile("value: true does not equal expected value: false"), + ExpectError: regexp.MustCompile("expected value false for BoolValue check, got: true"), }, }, }) @@ -340,7 +340,7 @@ func TestExpectKnownOutputValueAtPath_CheckPlan_Float64_KnownValueWrongValue(t * ), }, }, - ExpectError: regexp.MustCompile("value: 1.23 does not equal expected value: 3.21"), + ExpectError: regexp.MustCompile("expected value 3.21 for Float64Value check, got: 1.23"), }, }, }) @@ -421,7 +421,7 @@ func TestExpectKnownOutputValueAtPath_CheckPlan_Int64_KnownValueWrongValue(t *te ), }, }, - ExpectError: regexp.MustCompile("value: 123 does not equal expected value: 321"), + ExpectError: regexp.MustCompile("expected value 321 for Int64Value check, got: 123"), }, }, }) @@ -558,7 +558,7 @@ func TestExpectKnownOutputValueAtPath_CheckPlan_List_KnownValueWrongValue(t *tes ), }, }, - ExpectError: regexp.MustCompile(`value: value1 does not equal expected value: value3`), + ExpectError: regexp.MustCompile(`list element index 0: expected value value3 for StringValue check, got: value1`), }, }, }) @@ -651,7 +651,7 @@ func TestExpectKnownOutputValueAtPath_CheckPlan_ListPartial_KnownValueWrongValue ), }, }, - ExpectError: regexp.MustCompile(`value: value1 does not equal expected value: value3`), + ExpectError: regexp.MustCompile(`list element 0: expected value value3 for StringValue check, got: value1`), }, }, }) @@ -738,7 +738,7 @@ func TestExpectKnownOutputValueAtPath_CheckPlan_ListNumElements_WrongNum(t *test ), }, }, - ExpectError: regexp.MustCompile("wrong length: 2, expected 3"), + ExpectError: regexp.MustCompile("expected 3 elements for ListElements check, got 2 elements"), }, }, }) @@ -1021,7 +1021,7 @@ func TestExpectKnownOutputValueAtPath_CheckPlan_Map_KnownValueWrongValue(t *test ), }, }, - ExpectError: regexp.MustCompile(`missing key: key3`), + ExpectError: regexp.MustCompile(`missing element key3 for MapValue check`), }, }, }) @@ -1112,7 +1112,7 @@ func TestExpectKnownOutputValueAtPath_CheckPlan_MapPartial_KnownValueWrongValue( ), }, }, - ExpectError: regexp.MustCompile(`missing key: key3`), + ExpectError: regexp.MustCompile(`missing element key3 for MapValuePartial check`), }, }, }) @@ -1199,7 +1199,7 @@ func TestExpectKnownOutputValueAtPath_CheckPlan_MapNumElements_WrongNum(t *testi ), }, }, - ExpectError: regexp.MustCompile("wrong length: 2, expected 3"), + ExpectError: regexp.MustCompile("expected 3 elements for MapElements check, got 2 elements"), }, }, }) @@ -1292,7 +1292,7 @@ func TestExpectKnownOutputValueAtPath_CheckPlan_Number_KnownValueWrongValue(t *t ), }, }, - ExpectError: regexp.MustCompile("value: 123 does not equal expected value: 321"), + ExpectError: regexp.MustCompile("expected value 321 for NumberValue check, got: 123"), }, }, }) @@ -1385,7 +1385,7 @@ func TestExpectKnownOutputValueAtPath_CheckPlan_Set_KnownValueWrongValue(t *test ), }, }, - ExpectError: regexp.MustCompile(`expected value not found: value3`), + ExpectError: regexp.MustCompile(`missing value value3 for SetValue check`), }, }, }) @@ -1476,7 +1476,7 @@ func TestExpectKnownOutputValueAtPath_CheckPlan_SetPartial_KnownValueWrongValue( ), }, }, - ExpectError: regexp.MustCompile(`expected value not found: value3`), + ExpectError: regexp.MustCompile(`missing value value3 for SetValuePartial check`), }, }, }) @@ -1784,7 +1784,7 @@ func TestExpectKnownOutputValueAtPath_CheckPlan_String_KnownValueWrongValue(t *t knownvalue.StringValueExact("rts")), }, }, - ExpectError: regexp.MustCompile("value: str does not equal expected value: rts"), + ExpectError: regexp.MustCompile("expected value rts for StringValue check, got: str"), }, }, }) diff --git a/plancheck/expect_known_output_value_test.go b/plancheck/expect_known_output_value_test.go index 2c5f2ae9c..489c2a570 100644 --- a/plancheck/expect_known_output_value_test.go +++ b/plancheck/expect_known_output_value_test.go @@ -174,7 +174,7 @@ func TestExpectKnownOutputValue_CheckPlan_Bool_KnownValueWrongValue(t *testing.T ), }, }, - ExpectError: regexp.MustCompile("value: true does not equal expected value: false"), + ExpectError: regexp.MustCompile("expected value false for BoolValue check, got: true"), }, }, }) @@ -273,7 +273,7 @@ func TestExpectKnownOutputValue_CheckPlan_Float64_KnownValueWrongValue(t *testin ), }, }, - ExpectError: regexp.MustCompile("value: 1.23 does not equal expected value: 3.21"), + ExpectError: regexp.MustCompile("expected value 3.21 for Float64Value check, got: 1.23"), }, }, }) @@ -338,7 +338,7 @@ func TestExpectKnownOutputValue_CheckPlan_Int64_KnownValueWrongValue(t *testing. ), }, }, - ExpectError: regexp.MustCompile("value: 123 does not equal expected value: 321"), + ExpectError: regexp.MustCompile("expected value 321 for Int64Value check, got: 123"), }, }, }) @@ -451,7 +451,7 @@ func TestExpectKnownOutputValue_CheckPlan_List_KnownValueWrongValue(t *testing.T ), }, }, - ExpectError: regexp.MustCompile(`value: value1 does not equal expected value: value3`), + ExpectError: regexp.MustCompile(`list element index 0: expected value value3 for StringValue check, got: value1`), }, }, }) @@ -528,7 +528,7 @@ func TestExpectKnownOutputValue_CheckPlan_ListPartial_KnownValueWrongValue(t *te ), }, }, - ExpectError: regexp.MustCompile(`value: value1 does not equal expected value: value3`), + ExpectError: regexp.MustCompile(`list element 0: expected value value3 for StringValue check, got: value1`), }, }, }) @@ -599,7 +599,7 @@ func TestExpectKnownOutputValue_CheckPlan_ListNumElements_WrongNum(t *testing.T) ), }, }, - ExpectError: regexp.MustCompile("wrong length: 2, expected 3"), + ExpectError: regexp.MustCompile("expected 3 elements for ListElements check, got 2 elements"), }, }, }) @@ -834,7 +834,7 @@ func TestExpectKnownOutputValue_CheckPlan_Map_KnownValueWrongValue(t *testing.T) ), }, }, - ExpectError: regexp.MustCompile(`missing key: key3`), + ExpectError: regexp.MustCompile(`missing element key3 for MapValue check`), }, }, }) @@ -909,7 +909,7 @@ func TestExpectKnownOutputValue_CheckPlan_MapPartial_KnownValueWrongValue(t *tes ), }, }, - ExpectError: regexp.MustCompile(`missing key: key3`), + ExpectError: regexp.MustCompile(`missing element key3 for MapValuePartial check`), }, }, }) @@ -980,7 +980,7 @@ func TestExpectKnownOutputValue_CheckPlan_MapNumElements_WrongNum(t *testing.T) ), }, }, - ExpectError: regexp.MustCompile("wrong length: 2, expected 3"), + ExpectError: regexp.MustCompile("expected 3 elements for MapElements check, got 2 elements"), }, }, }) @@ -1057,7 +1057,7 @@ func TestExpectKnownOutputValue_CheckPlan_Number_KnownValueWrongValue(t *testing ), }, }, - ExpectError: regexp.MustCompile("value: 123 does not equal expected value: 321"), + ExpectError: regexp.MustCompile("expected value 321 for NumberValue check, got: 123"), }, }, }) @@ -1134,7 +1134,7 @@ func TestExpectKnownOutputValue_CheckPlan_Set_KnownValueWrongValue(t *testing.T) ), }, }, - ExpectError: regexp.MustCompile(`expected value not found: value3`), + ExpectError: regexp.MustCompile(`missing value value3 for SetValue check`), }, }, }) @@ -1209,7 +1209,7 @@ func TestExpectKnownOutputValue_CheckPlan_SetPartial_KnownValueWrongValue(t *tes ), }, }, - ExpectError: regexp.MustCompile(`expected value not found: value3`), + ExpectError: regexp.MustCompile(`missing value value3 for SetValuePartial check`), }, }, }) @@ -1461,7 +1461,7 @@ func TestExpectKnownOutputValue_CheckPlan_String_KnownValueWrongValue(t *testing knownvalue.StringValueExact("rts")), }, }, - ExpectError: regexp.MustCompile("value: str does not equal expected value: rts"), + ExpectError: regexp.MustCompile("expected value rts for StringValue check, got: str"), }, }, }) diff --git a/plancheck/expect_known_value_test.go b/plancheck/expect_known_value_test.go index afafe20b8..1d9c86741 100644 --- a/plancheck/expect_known_value_test.go +++ b/plancheck/expect_known_value_test.go @@ -160,7 +160,7 @@ func TestExpectKnownValue_CheckPlan_Bool_KnownValueWrongValue(t *testing.T) { ), }, }, - ExpectError: regexp.MustCompile("value: true does not equal expected value: false"), + ExpectError: regexp.MustCompile("expected value false for BoolValue check, got: true"), }, }, }) @@ -250,7 +250,7 @@ func TestExpectKnownValue_CheckPlan_Float64_KnownValueWrongValue(t *testing.T) { ), }, }, - ExpectError: regexp.MustCompile("value: 1.23 does not equal expected value: 3.21"), + ExpectError: regexp.MustCompile("expected value 3.21 for Float64Value check, got: 1.23"), }, }, }) @@ -309,7 +309,7 @@ func TestExpectKnownValue_CheckPlan_Int64_KnownValueWrongValue(t *testing.T) { ), }, }, - ExpectError: regexp.MustCompile("value: 123 does not equal expected value: 321"), + ExpectError: regexp.MustCompile("expected value 321 for Int64Value check, got: 123"), }, }, }) @@ -413,7 +413,7 @@ func TestExpectKnownValue_CheckPlan_List_KnownValueWrongValue(t *testing.T) { ), }, }, - ExpectError: regexp.MustCompile(`value: value1 does not equal expected value: value3`), + ExpectError: regexp.MustCompile(`list element index 0: expected value value3 for StringValue check, got: value1`), }, }, }) @@ -484,7 +484,7 @@ func TestExpectKnownValue_CheckPlan_ListPartial_KnownValueWrongValue(t *testing. ), }, }, - ExpectError: regexp.MustCompile(`value: value1 does not equal expected value: value3`), + ExpectError: regexp.MustCompile(`list element 0: expected value value3 for StringValue check, got: value1`), }, }, }) @@ -549,7 +549,7 @@ func TestExpectKnownValue_CheckPlan_ListNumElements_WrongNum(t *testing.T) { ), }, }, - ExpectError: regexp.MustCompile("wrong length: 2, expected 3"), + ExpectError: regexp.MustCompile("expected 3 elements for ListElements check, got 2 elements"), }, }, }) @@ -766,7 +766,7 @@ func TestExpectKnownValue_CheckPlan_Map_KnownValueWrongValue(t *testing.T) { ), }, }, - ExpectError: regexp.MustCompile(`missing key: key3`), + ExpectError: regexp.MustCompile(`missing element key3 for MapValue check`), }, }, }) @@ -835,7 +835,7 @@ func TestExpectKnownValue_CheckPlan_MapPartial_KnownValueWrongValue(t *testing.T ), }, }, - ExpectError: regexp.MustCompile(`missing key: key3`), + ExpectError: regexp.MustCompile(`missing element key3 for MapValuePartial check`), }, }, }) @@ -900,7 +900,7 @@ func TestExpectKnownValue_CheckPlan_MapNumElements_WrongNum(t *testing.T) { ), }, }, - ExpectError: regexp.MustCompile("wrong length: 2, expected 3"), + ExpectError: regexp.MustCompile("expected 3 elements for MapElements check, got 2 elements"), }, }, }) @@ -971,7 +971,7 @@ func TestExpectKnownValue_CheckPlan_Number_KnownValueWrongValue(t *testing.T) { ), }, }, - ExpectError: regexp.MustCompile("value: 123 does not equal expected value: 321"), + ExpectError: regexp.MustCompile("expected value 321 for NumberValue check, got: 123"), }, }, }) @@ -1042,7 +1042,7 @@ func TestExpectKnownValue_CheckPlan_Set_KnownValueWrongValue(t *testing.T) { ), }, }, - ExpectError: regexp.MustCompile(`expected value not found: value3`), + ExpectError: regexp.MustCompile(`missing value value3 for SetValue check`), }, }, }) @@ -1111,7 +1111,7 @@ func TestExpectKnownValue_CheckPlan_SetPartial_KnownValueWrongValue(t *testing.T ), }, }, - ExpectError: regexp.MustCompile(`expected value not found: value3`), + ExpectError: regexp.MustCompile(`missing value value3 for SetValuePartial check`), }, }, }) @@ -1342,7 +1342,7 @@ func TestExpectKnownValue_CheckPlan_String_KnownValueWrongValue(t *testing.T) { knownvalue.StringValueExact("rts")), }, }, - ExpectError: regexp.MustCompile("value: str does not equal expected value: rts"), + ExpectError: regexp.MustCompile("expected value rts for StringValue check, got: str"), }, }, })