From b1cbac6e3096136a7ecdf2b7fe4bdba311f95056 Mon Sep 17 00:00:00 2001 From: Avishalom Shalit Date: Wed, 7 Feb 2018 18:01:21 -0500 Subject: [PATCH] document non existing name --- integration/iid/iid_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/integration/iid/iid_test.go b/integration/iid/iid_test.go index d3303dc4..55cf5620 100644 --- a/integration/iid/iid_test.go +++ b/integration/iid/iid_test.go @@ -50,12 +50,13 @@ func TestMain(m *testing.M) { } func TestNonExisting(t *testing.T) { - err := client.DeleteInstanceID(context.Background(), "dnon-existY") + // legal instance IDs are /[cdef][A-Za-z0-9_-]{9}[AEIMQUYcgkosw048]/ + err := client.DeleteInstanceID(context.Background(), "fictive-ID0") if err == nil { - t.Errorf("DeleteInstanceID(\"dnon-existY\") = nil; want error") + t.Errorf("DeleteInstanceID(non-existing) = nil; want error") } - want := `instance id "dnon-existY": failed to find the instance id` + want := `instance id "fictive-ID0": failed to find the instance id` if err.Error() != want { - t.Errorf("DeleteInstanceID(\"dnon-existY\") = %v; want = %v", err, want) + t.Errorf("DeleteInstanceID(non-existing) = %v; want = %v", err, want) } }