Skip to content

Commit

Permalink
Fix gce tests
Browse files Browse the repository at this point in the history
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
welteki authored and alexellis committed Sep 1, 2023
1 parent 1f695e1 commit ae8496b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions provision/gce_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ func TestCustomGCEIDConstAndDest(t *testing.T) {
inputInstanceName := "inlets"
inputZone := "us-central1-a"
inputProjectID := "playground"
inputRegion := "us-central"

customID := toGCEID(inputInstanceName, inputZone, inputProjectID)
customID := toGCEID(inputInstanceName, inputZone, inputProjectID, inputRegion)

outputInstanceName, outputZone, outputProjectID, err := getGCEFieldsFromID(customID)
outputInstanceName, outputZone, outputProjectID, outputRegion, err := getGCEFieldsFromID(customID)
if err != nil {
t.Error(err)
}
if inputInstanceName != outputInstanceName ||
inputZone != outputZone ||
inputProjectID != outputProjectID {
inputProjectID != outputProjectID ||
inputRegion != outputRegion {
t.Errorf("Input fields: %s, %s, %s are not equal to the ouput fields: %s, %s, %s",
inputInstanceName, inputZone, inputProjectID, outputInstanceName, outputZone, outputProjectID)
}
Expand Down

0 comments on commit ae8496b

Please sign in to comment.