(t *testing.T)
| 123 | } |
| 124 | |
| 125 | func TestNew_AddressesAndCloudID_Error(t *testing.T) { |
| 126 | t.Parallel() |
| 127 | _, err := New( |
| 128 | WithAddresses("http://localhost:8080"), |
| 129 | WithCloudID("foo:ABC="), |
| 130 | ) |
| 131 | if err == nil { |
| 132 | t.Fatal("Expected error when both Addresses and CloudID are set") |
| 133 | } |
| 134 | match, _ := regexp.MatchString("both .* are set", err.Error()) |
| 135 | if !match { |
| 136 | t.Errorf("Unexpected error message: %s", err) |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | func TestNew_InvalidCloudID(t *testing.T) { |
| 141 | t.Parallel() |
nothing calls this directly
no test coverage detected