forked from cloudflare/cloudflare-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: namespace
zoneID
and accountID
placeholders
Make it explicit these are used for tests and nothing more.
- Loading branch information
1 parent
590aa29
commit 3ff7cbf
Showing
21 changed files
with
240 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,17 +35,17 @@ func TestAcessCACertificate(t *testing.T) { | |
PublicKey: "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTI...3urg/XpGMdgaSs5ZdptUPw= [email protected]", | ||
} | ||
|
||
mux.HandleFunc("/accounts/"+accountID+"/access/apps/f174e90a-fafe-4643-bbbc-4a0ed4fc8415/ca", handler) | ||
mux.HandleFunc("/accounts/"+testAccountID+"/access/apps/f174e90a-fafe-4643-bbbc-4a0ed4fc8415/ca", handler) | ||
|
||
actual, err := client.AccessCACertificate(context.Background(), accountID, "f174e90a-fafe-4643-bbbc-4a0ed4fc8415") | ||
actual, err := client.AccessCACertificate(context.Background(), testAccountID, "f174e90a-fafe-4643-bbbc-4a0ed4fc8415") | ||
|
||
if assert.NoError(t, err) { | ||
assert.Equal(t, want, actual) | ||
} | ||
|
||
mux.HandleFunc("/zones/"+zoneID+"/access/apps/f174e90a-fafe-4643-bbbc-4a0ed4fc8415/ca", handler) | ||
mux.HandleFunc("/zones/"+testZoneID+"/access/apps/f174e90a-fafe-4643-bbbc-4a0ed4fc8415/ca", handler) | ||
|
||
actual, err = client.ZoneLevelAccessCACertificate(context.Background(), zoneID, "f174e90a-fafe-4643-bbbc-4a0ed4fc8415") | ||
actual, err = client.ZoneLevelAccessCACertificate(context.Background(), testZoneID, "f174e90a-fafe-4643-bbbc-4a0ed4fc8415") | ||
|
||
if assert.NoError(t, err) { | ||
assert.Equal(t, want, actual) | ||
|
@@ -78,17 +78,17 @@ func TestAcessCACertificates(t *testing.T) { | |
PublicKey: "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTI...3urg/XpGMdgaSs5ZdptUPw= [email protected]", | ||
}} | ||
|
||
mux.HandleFunc("/accounts/"+accountID+"/access/apps/ca", handler) | ||
mux.HandleFunc("/accounts/"+testAccountID+"/access/apps/ca", handler) | ||
|
||
actual, err := client.AccessCACertificates(context.Background(), accountID) | ||
actual, err := client.AccessCACertificates(context.Background(), testAccountID) | ||
|
||
if assert.NoError(t, err) { | ||
assert.Equal(t, want, actual) | ||
} | ||
|
||
mux.HandleFunc("/zones/"+zoneID+"/access/apps/ca", handler) | ||
mux.HandleFunc("/zones/"+testZoneID+"/access/apps/ca", handler) | ||
|
||
actual, err = client.ZoneLevelAccessCACertificates(context.Background(), zoneID) | ||
actual, err = client.ZoneLevelAccessCACertificates(context.Background(), testZoneID) | ||
|
||
if assert.NoError(t, err) { | ||
assert.Equal(t, want, actual) | ||
|
@@ -121,17 +121,17 @@ func TestCreateAcessCACertificates(t *testing.T) { | |
PublicKey: "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTI...3urg/XpGMdgaSs5ZdptUPw= [email protected]", | ||
} | ||
|
||
mux.HandleFunc("/accounts/"+accountID+"/access/apps/f174e90a-fafe-4643-bbbc-4a0ed4fc8415/ca", handler) | ||
mux.HandleFunc("/accounts/"+testAccountID+"/access/apps/f174e90a-fafe-4643-bbbc-4a0ed4fc8415/ca", handler) | ||
|
||
actual, err := client.CreateAccessCACertificate(context.Background(), accountID, "f174e90a-fafe-4643-bbbc-4a0ed4fc8415") | ||
actual, err := client.CreateAccessCACertificate(context.Background(), testAccountID, "f174e90a-fafe-4643-bbbc-4a0ed4fc8415") | ||
|
||
if assert.NoError(t, err) { | ||
assert.Equal(t, want, actual) | ||
} | ||
|
||
mux.HandleFunc("/zones/"+zoneID+"/access/apps/f174e90a-fafe-4643-bbbc-4a0ed4fc8415/ca", handler) | ||
mux.HandleFunc("/zones/"+testZoneID+"/access/apps/f174e90a-fafe-4643-bbbc-4a0ed4fc8415/ca", handler) | ||
|
||
actual, err = client.CreateZoneLevelAccessCACertificate(context.Background(), zoneID, "f174e90a-fafe-4643-bbbc-4a0ed4fc8415") | ||
actual, err = client.CreateZoneLevelAccessCACertificate(context.Background(), testZoneID, "f174e90a-fafe-4643-bbbc-4a0ed4fc8415") | ||
|
||
if assert.NoError(t, err) { | ||
assert.Equal(t, want, actual) | ||
|
@@ -156,15 +156,15 @@ func TestDeleteAcessCACertificates(t *testing.T) { | |
`) | ||
} | ||
|
||
mux.HandleFunc("/accounts/"+accountID+"/access/apps/f174e90a-fafe-4643-bbbc-4a0ed4fc8415/ca", handler) | ||
mux.HandleFunc("/accounts/"+testAccountID+"/access/apps/f174e90a-fafe-4643-bbbc-4a0ed4fc8415/ca", handler) | ||
|
||
err := client.DeleteAccessCACertificate(context.Background(), accountID, "f174e90a-fafe-4643-bbbc-4a0ed4fc8415") | ||
err := client.DeleteAccessCACertificate(context.Background(), testAccountID, "f174e90a-fafe-4643-bbbc-4a0ed4fc8415") | ||
|
||
assert.NoError(t, err) | ||
|
||
mux.HandleFunc("/zones/"+zoneID+"/access/apps/f174e90a-fafe-4643-bbbc-4a0ed4fc8415/ca", handler) | ||
mux.HandleFunc("/zones/"+testZoneID+"/access/apps/f174e90a-fafe-4643-bbbc-4a0ed4fc8415/ca", handler) | ||
|
||
err = client.DeleteZoneLevelAccessCACertificate(context.Background(), zoneID, "f174e90a-fafe-4643-bbbc-4a0ed4fc8415") | ||
err = client.DeleteZoneLevelAccessCACertificate(context.Background(), testZoneID, "f174e90a-fafe-4643-bbbc-4a0ed4fc8415") | ||
|
||
assert.NoError(t, err) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.