Skip to content

Commit

Permalink
Updated all test
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro JNM <[email protected]>
  • Loading branch information
alejandrojnm committed Aug 17, 2020
1 parent 63a3ae5 commit d8b7353
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 25 deletions.
8 changes: 4 additions & 4 deletions dns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ func TestFindDNSDomain(t *testing.T) {
}

_, err := client.FindDNSDomain("example")
if err.Error() != "unable to find example because there were multiple matches" {
t.Errorf("Expected %s, got %s", "unable to find example because there were multiple matches", err.Error())
if err.Error() != "MultipleMatchesError: unable to find example because there were multiple matches" {
t.Errorf("Expected %s, got %s", "MultipleMatchesError: unable to find example because there were multiple matches", err.Error())
}

_, err = client.FindDNSDomain("missing")
if err.Error() != "unable to find missing, zero matches" {
t.Errorf("Expected %s, got %s", "unable to find missing, zero matches", err.Error())
if err.Error() != "ZeroMatchesError: unable to find missing, zero matches" {
t.Errorf("Expected %s, got %s", "ZeroMatchesError: unable to find missing, zero matches", err.Error())
}
}

Expand Down
8 changes: 4 additions & 4 deletions firewall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ func TestFindFirewall(t *testing.T) {
}

_, err := client.FindFirewall("web")
if err.Error() != "unable to find web because there were multiple matches" {
if err.Error() != "MultipleMatchesError: unable to find web because there were multiple matches" {
t.Errorf("Expected %s, got %s", "unable to find web because there were multiple matches", err.Error())
}

_, err = client.FindFirewall("missing")
if err.Error() != "unable to find missing, zero matches" {
if err.Error() != "ZeroMatchesError: unable to find missing, zero matches" {
t.Errorf("Expected %s, got %s", "unable to find missing, zero matches", err.Error())
}
}
Expand Down Expand Up @@ -238,12 +238,12 @@ func TestFindFirewallRule(t *testing.T) {
}

_, err := client.FindFirewallRule("22", "2")
if err.Error() != "unable to find 2 because there were multiple matches" {
if err.Error() != "MultipleMatchesError: unable to find 2 because there were multiple matches" {
t.Errorf("Expected %s, got %s", "unable to find 2 because there were multiple matches", err.Error())
}

_, err = client.FindFirewallRule("22", "missing")
if err.Error() != "unable to find missing, zero matches" {
if err.Error() != "ZeroMatchesError: unable to find missing, zero matches" {
t.Errorf("Expected %s, got %s", "unable to find missing, zero matches", err.Error())
}
}
Expand Down
4 changes: 2 additions & 2 deletions instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ func TestFindInstance(t *testing.T) {
}

_, err := client.FindInstance("com")
if err.Error() != "unable to find com because there were multiple matches" {
if err.Error() != "MultipleMatchesError: unable to find com because there were multiple matches" {
t.Errorf("Expected %s, got %s", "unable to find com because there were multiple matches", err.Error())
}

_, err = client.FindInstance("missing")
if err.Error() != "unable to find missing, zero matches" {
if err.Error() != "ZeroMatchesError: unable to find missing, zero matches" {
t.Errorf("Expected %s, got %s", "unable to find missing, zero matches", err.Error())
}
}
Expand Down
4 changes: 2 additions & 2 deletions kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ func TestFindKubernetesCluster(t *testing.T) {
}

_, err = client.FindKubernetesCluster("cluster")
if err.Error() != "unable to find cluster because there were multiple matches" {
if err.Error() != "MultipleMatchesError: unable to find cluster because there were multiple matches" {
t.Errorf("Expected %s, got %s", "unable to find cluster because there were multiple matches", err.Error())
}

_, err = client.FindKubernetesCluster("missing")
if err.Error() != "unable to find missing, zero matches" {
if err.Error() != "ZeroMatchesError: unable to find missing, zero matches" {
t.Errorf("Expected %s, got %s", "unable to find missing, zero matches", err.Error())
}
}
Expand Down
4 changes: 2 additions & 2 deletions loadbalancer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ func TestFindLoadBalancer(t *testing.T) {
}

_, err = client.FindLoadBalancer("example")
if err.Error() != "unable to find example because there were multiple matches" {
if err.Error() != "MultipleMatchesError: unable to find example because there were multiple matches" {
t.Errorf("Expected %s, got %s", "unable to find example because there were multiple matches", err.Error())
}

_, err = client.FindLoadBalancer("missing")
if err.Error() != "unable to find missing, zero matches" {
if err.Error() != "ZeroMatchesError: unable to find missing, zero matches" {
t.Errorf("Expected %s, got %s", "unable to find missing, zero matches", err.Error())
}
}
Expand Down
6 changes: 3 additions & 3 deletions network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ func TestFindNetwork(t *testing.T) {
}

_, err = client.FindNetwork("net")
if err.Error() != "unable to find net because there were multiple matches" {
if err.Error() != "MultipleMatchesError: unable to find net because there were multiple matches" {
t.Errorf("Expected %s, got %s", "unable to find net because there were multiple matches", err.Error())
}

_, err = client.FindNetwork("missing")
if err.Error() != "unable to find missing, zero matches" {
t.Errorf("Expected %s, got %s", "unable to find missing, zero matches", err.Error())
if err.Error() != "ZeroMatchesError: unable to find missing, zero matches" {
t.Errorf("Expected %s, got %s", "ZeroMatchesError: unable to find missing, zero matches", err.Error())
}
}

Expand Down
4 changes: 2 additions & 2 deletions snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ func TestFindSnapshot(t *testing.T) {
}

_, err = client.FindSnapshot("backup")
if err.Error() != "unable to find backup because there were multiple matches" {
if err.Error() != "MultipleMatchesError: unable to find backup because there were multiple matches" {
t.Errorf("Expected %s, got %s", "unable to find backup because there were multiple matches", err.Error())
}

_, err = client.FindSnapshot("missing")
if err.Error() != "unable to find missing, zero matches" {
if err.Error() != "ZeroMatchesError: unable to find missing, zero matches" {
t.Errorf("Expected %s, got %s", "unable to find missing, zero matches", err.Error())
}
}
Expand Down
4 changes: 2 additions & 2 deletions ssh_key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ func TestFindSSHKey(t *testing.T) {
}

_, err = client.FindSSHKey("23")
if err.Error() != "unable to find 23 because there were multiple matches" {
if err.Error() != "MultipleMatchesError: unable to find 23 because there were multiple matches" {
t.Errorf("Expected %s, got %s", "unable to find 23 because there were multiple matches", err.Error())
}

_, err = client.FindSSHKey("missing")
if err.Error() != "unable to find missing, zero matches" {
if err.Error() != "ZeroMatchesError: unable to find missing, zero matches" {
t.Errorf("Expected %s, got %s", "unable to find missing, zero matches", err.Error())
}
}
4 changes: 2 additions & 2 deletions volume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ func TestFindVolume(t *testing.T) {
}

_, err = client.FindVolume("volume")
if err.Error() != "unable to find volume because there were multiple matches" {
if err.Error() != "MultipleMatchesError: unable to find volume because there were multiple matches" {
t.Errorf("Expected %s, got %s", "unable to find volume because there were multiple matches", err.Error())
}

_, err = client.FindVolume("missing")
if err.Error() != "unable to find missing, zero matches" {
if err.Error() != "ZeroMatchesError: unable to find missing, zero matches" {
t.Errorf("Expected %s, got %s", "unable to find missing, zero matches", err.Error())
}
}
Expand Down
4 changes: 2 additions & 2 deletions webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ func TestFindWebhook(t *testing.T) {
}

_, err = client.FindWebhook("example")
if err.Error() != "unable to find example because there were multiple matches" {
if err.Error() != "MultipleMatchesError: unable to find example because there were multiple matches" {
t.Errorf("Expected %s, got %s", "unable to find example because there were multiple matches", err.Error())
}

_, err = client.FindWebhook("missing")
if err.Error() != "unable to find missing, zero matches" {
if err.Error() != "ZeroMatchesError: unable to find missing, zero matches" {
t.Errorf("Expected %s, got %s", "unable to find missing, zero matches", err.Error())
}
}
Expand Down

0 comments on commit d8b7353

Please sign in to comment.